From 688c6862e5418ef0dda13d986b36696b14442e21 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 24 Jan 2024 18:14:43 +0100 Subject: [PATCH] Bump clippy to 1.75.0 and adapt codebase to latest rules --- .circleci/config.yml | 2 +- libwasmvm/src/error/rust.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d5fdcf28b..98697e44b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -430,7 +430,7 @@ workflows: matrix: parameters: # Run with MSRV and some modern stable Rust - rust-version: ["1.70.0", "1.73.0"] + rust-version: ["1.70.0", "1.75.0"] - libwasmvm_audit - format-go - wasmvm_no_cgo diff --git a/libwasmvm/src/error/rust.rs b/libwasmvm/src/error/rust.rs index 845452792..cb0656dcc 100644 --- a/libwasmvm/src/error/rust.rs +++ b/libwasmvm/src/error/rust.rs @@ -317,8 +317,8 @@ mod tests { #[test] fn from_std_str_utf8error_works() { - let broken = b"Hello \xF0\x90\x80World"; - let error: RustError = str::from_utf8(broken).unwrap_err().into(); + let broken = Vec::from(b"Hello \xF0\x90\x80World" as &[u8]); + 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")