Skip to content

Commit

Permalink
Update lib.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
baseplate-admin committed Apr 30, 2024
1 parent 43fdfda commit 5bd4935
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rust/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ fn svg_to_base64(
svg_data =
resvg::usvg::decompress_svgz(&svg_data).expect("can't decompress the svg file");
};
svg_string = std::str::from_utf8(&svg_data).unwrap().to_owned();
svg_string = std::str::from_utf8(&svg_data)
.expect("can't convert bytes to utf-8")
.to_owned();
} else {
svg_string = svg;
}
Expand Down

0 comments on commit 5bd4935

Please sign in to comment.