Skip to content

Commit 4e90c05

Browse files
committed
Work around clippy warning
1 parent deb0733 commit 4e90c05

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

libwasmvm/src/error/rust.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,8 @@ mod tests {
297297

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

0 commit comments

Comments
 (0)