We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
unwrap
1 parent 92862c1 commit 97e9a6eCopy full SHA for 97e9a6e
packages/biliass/rust/src/reader/xml.rs
@@ -36,7 +36,11 @@ fn parse_comment_content(reader: &mut Reader<&[u8]>) -> Result<String, ParseErro
36
loop {
37
match reader.read_event_into(&mut buf) {
38
Ok(Event::Text(e)) => {
39
- contents.push(e.decode().unwrap().into_owned());
+ contents.push(
40
+ e.decode()
41
+ .map_err(|e| ParseError::Xml(format!("Error decoding text: {e}")))?
42
+ .into_owned(),
43
+ );
44
}
45
Ok(Event::GeneralRef(e)) => {
46
let entity_str = std::str::from_utf8(e.as_ref())
0 commit comments