From d07aa06c6dcfa23286ed03ec6c446a1c91ef8a87 Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Fri, 5 Jan 2024 18:04:22 +0100 Subject: [PATCH] fix clippy --- integration-tests/erc1155/lib.rs | 3 ++- integration-tests/sr25519-verification/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/integration-tests/erc1155/lib.rs b/integration-tests/erc1155/lib.rs index 6bf1d1aa532..ba06c1ea052 100644 --- a/integration-tests/erc1155/lib.rs +++ b/integration-tests/erc1155/lib.rs @@ -1,7 +1,6 @@ #![cfg_attr(not(feature = "std"), no_std, no_main)] use ink::{ - env::ReturnErrorCode, prelude::vec::Vec, primitives::AccountId, }; @@ -414,6 +413,8 @@ mod erc1155 { ) } Err(e) => { + use ink::env::ReturnErrorCode; + match e { ink::env::Error::ReturnError( ReturnErrorCode::CodeNotFound diff --git a/integration-tests/sr25519-verification/lib.rs b/integration-tests/sr25519-verification/lib.rs index b695176a0da..3ab23ba2671 100644 --- a/integration-tests/sr25519-verification/lib.rs +++ b/integration-tests/sr25519-verification/lib.rs @@ -102,7 +102,7 @@ pub mod sr25519_verification { 143, ]; let result = ink::env::sr25519_verify(&signature, &message, &public_key); - assert_eq!(result, Err(ink::env::Error::Sr25519VerifyFailed)); + assert_eq!(result, Err(ink::env::ReturnErrorCode::Sr25519VerifyFailed.into())); } #[ink::test] @@ -128,7 +128,7 @@ pub mod sr25519_verification { 143, ]; let result = ink::env::sr25519_verify(&signature, &message, &public_key); - assert_eq!(result, Err(ink::env::Error::Sr25519VerifyFailed)); + assert_eq!(result, Err(ink::env::ReturnErrorCode::Sr25519VerifyFailed.into())); } } }