Skip to content

Commit

Permalink
Work around clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 committed Oct 12, 2023
1 parent deb0733 commit 4e90c05
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libwasmvm/src/error/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,8 @@ mod tests {

#[test]
fn from_std_str_utf8error_works() {
let error: RustError = str::from_utf8(b"Hello \xF0\x90\x80World")
.unwrap_err()
.into();
let broken = b"Hello \xF0\x90\x80World";
let error: RustError = str::from_utf8(broken).unwrap_err().into();
match error {
RustError::InvalidUtf8 { msg, .. } => {
assert_eq!(msg, "invalid utf-8 sequence of 3 bytes from index 6")
Expand Down

0 comments on commit 4e90c05

Please sign in to comment.