Skip to content

Commit e7e1535

Browse files
committed
Fix warning regarding discarding content
1 parent b616bd8 commit e7e1535

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/extract.typ

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
// Handle text content.
4848
if body.has("text") {
4949
let (text, ..fields) = body.fields()
50-
if "label" in fields { fields.remove("label") }
50+
let _ = if "label" in fields { fields.remove("label") }
5151
let label = if body.has("label") { body.label }
5252
let func(it) = if it != none { body.func()(..fields, it) }
5353
let (letter, rest) = extract-first-letter(body.text)
@@ -57,7 +57,7 @@
5757
// Handle content with "body" field.
5858
if body.func() in splittable {
5959
let (body: text, ..fields) = body.fields()
60-
if "label" in fields { fields.remove("label") }
60+
let _ = if "label" in fields { fields.remove("label") }
6161
let label = if body.has("label") { body.label }
6262
let func(it) = if it != none { body.func()(..fields, it) }
6363
let (letter, rest) = extract-first-letter(text)
@@ -67,7 +67,7 @@
6767
// Handle styled content.
6868
if body.has("child") {
6969
let (child, styles, ..fields) = body.fields()
70-
if "label" in fields { fields.remove("label") }
70+
let _ = if "label" in fields { fields.remove("label") }
7171
let label = if body.has("label") { body.label }
7272
let func(it) = if it != none { body.func()(it, styles) }
7373
let (letter, rest) = extract-first-letter(child)

src/split.typ

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
// Handle text content.
6666
if body.has("text") {
6767
let (text, ..fields) = body.fields()
68-
if "label" in fields { fields.remove("label") }
68+
let _ = if "label" in fields { fields.remove("label") }
6969
let label = if body.has("label") { body.label }
7070
let func(it) = if it != none { body.func()(..fields, it) }
7171
let (first, second, sep) = split(text, index)
@@ -75,7 +75,7 @@
7575
// Handle content with "body" field.
7676
if body.func() in splittable {
7777
let (body: text, ..fields) = body.fields()
78-
if "label" in fields { fields.remove("label") }
78+
let _ = if "label" in fields { fields.remove("label") }
7979
let label = if body.has("label") { body.label }
8080
let func(it) = if it != none { body.func()(..fields, it) }
8181
let (first, second, sep) = split(text, index)
@@ -85,7 +85,7 @@
8585
// Handle styled content.
8686
if body.has("child") {
8787
let (child, styles, ..fields) = body.fields()
88-
if "label" in fields { fields.remove("label") }
88+
let _ = if "label" in fields { fields.remove("label") }
8989
let label = if body.has("label") { body.label }
9090
let func(it) = if it != none { body.func()(it, styles) }
9191
let (first, second, sep) = split(child, index)

0 commit comments

Comments
 (0)