This commit is contained in:
Felix
2023-07-09 06:44:54 +00:00
parent 76ca9182ed
commit a37d0d2750

View File

@@ -56,7 +56,9 @@ pub fn is_binary_xml(input: &[u8]) -> bool {
pub fn from_binary(input: Bytes) -> Result<(NodeCollection, EncodingType)> {
let reader = Reader::new(input)?;
let encoding = reader.encoding();
let collection = reader.collect::<Option<_>>().ok_or(KbinError::NoNodeCollection)?;
let collection = reader
.collect::<Option<_>>()
.ok_or(KbinError::NoNodeCollection)?;
Ok((collection, encoding))
}