Skip to content

Commit bb3e756

Browse files
committed
build.rs: raise on missing icon id
1 parent e7726b5 commit bb3e756

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

build.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,9 @@ fn extract_icons_from_sprite(sprite_content: &[u8], mut callback: impl FnMut(&st
218218
Some(result)
219219
}
220220
while let Some(mut symbol_tag) = take_between(&mut sprite_str, "<symbol", "</symbol>") {
221-
if let Some(id) = take_between(&mut symbol_tag, "id=\"tabler-", "\"") {
222-
let content_start = symbol_tag.find('>').unwrap() + 1;
223-
callback(id, &symbol_tag[content_start..]);
224-
}
221+
let id = take_between(&mut symbol_tag, "id=\"tabler-", "\"").expect("id not found");
222+
let content_start = symbol_tag.find('>').unwrap() + 1;
223+
callback(id, &symbol_tag[content_start..]);
225224
}
226225
}
227226

0 commit comments

Comments
 (0)