From efd8f4214f1087eef735161fe0e32de1febac8bb Mon Sep 17 00:00:00 2001 From: zhangsoledad <787953403@qq.com> Date: Wed, 8 Jan 2025 11:12:01 +0800 Subject: [PATCH] chore: make clippy happy --- script/src/error.rs | 2 +- script/src/syscalls/tests/mod.rs | 1 + util/types/src/core/error.rs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/script/src/error.rs b/script/src/error.rs index f3185cdecfb..9d55d7a67f1 100644 --- a/script/src/error.rs +++ b/script/src/error.rs @@ -230,7 +230,7 @@ mod tests { #[test] fn test_vm_internal_error_preserves_text() { let vm_error = VMInternalError::Unexpected(ARGV_TOO_LONG_TEXT.to_string()); - let script_error = ScriptError::VMInternalError(vm_error.clone()); + let script_error = ScriptError::VMInternalError(vm_error); let error: Error = script_error.output_type_script(177).into(); assert!(format!("{}", error).contains(ARGV_TOO_LONG_TEXT)); diff --git a/script/src/syscalls/tests/mod.rs b/script/src/syscalls/tests/mod.rs index 61008ccbfa5..df4475630a0 100644 --- a/script/src/syscalls/tests/mod.rs +++ b/script/src/syscalls/tests/mod.rs @@ -9,6 +9,7 @@ mod vm_version_0; mod vm_version_1; #[test] +#[allow(clippy::assertions_on_constants)] fn test_max_argv_length() { assert!(crate::syscalls::MAX_ARGV_LENGTH < u64::MAX); } diff --git a/util/types/src/core/error.rs b/util/types/src/core/error.rs index 3909b906a13..ea2a035c66b 100644 --- a/util/types/src/core/error.rs +++ b/util/types/src/core/error.rs @@ -224,4 +224,5 @@ impl OutPointError { } } +/// unexpected argv pub const ARGV_TOO_LONG_TEXT: &str = "@@@VM@@@UNEXPECTED@@@ARGV@@@TOOLONG@@@";