Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
0123456789-jpg committed Aug 12, 2024
1 parent 374af6a commit 31a628d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions crates/util/identifier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,8 @@ mod edcode {
#[inline]
fn decode(buf: B) -> Result<Self, rimecraft_edcode2::BoxedError<'de>> {
let str = String::decode(buf)?;
Ok(Self::from_str(str.as_str()).map_err(|_| {
Box::new(io::Error::new(
ErrorKind::InvalidData,
format!("unable to parse identifier {str}"),
))
})?)
Self::from_str(str.as_str())
.map_err(|_| format!("unable to parse identifier {str}").into())
}
}
}
Expand Down

0 comments on commit 31a628d

Please sign in to comment.