Skip to content

Commit

Permalink
fix clip
Browse files Browse the repository at this point in the history
  • Loading branch information
pgherveou committed Jan 10, 2024
1 parent 27050de commit 6329cca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 21 deletions.
9 changes: 2 additions & 7 deletions integration-tests/call-runtime/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ mod runtime_call {
RuntimeCall,
};

use ink::env::{
Error as EnvError,
ReturnErrorCode,
};
use ink::env::Error as EnvError;

/// A trivial contract with a single message, that uses `call-runtime` API for
/// performing native token transfer.
Expand All @@ -66,9 +63,7 @@ mod runtime_call {
impl From<EnvError> for RuntimeError {
fn from(e: EnvError) -> Self {
match e {
EnvError::CallRuntimeFailed => {
RuntimeError::CallRuntimeFailed
}
EnvError::CallRuntimeFailed => RuntimeError::CallRuntimeFailed,
_ => panic!("Unexpected error from `pallet-contracts`."),
}
}
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/erc1155/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@ mod erc1155 {
}
Err(e) => {
match e {
ink::env::Error::CodeNotFound | ink::env::Error::NotCallable,
) => {
ink::env::Error::CodeNotFound
| ink::env::Error::NotCallable => {
// Our recipient wasn't a smart contract, so there's
// nothing more for
// us to do
Expand Down
15 changes: 3 additions & 12 deletions integration-tests/sr25519-verification/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,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::Error::Sr25519VerifyFailed));
}

#[ink::test]
Expand All @@ -102,10 +99,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::Error::Sr25519VerifyFailed));
}

#[ink::test]
Expand All @@ -131,10 +125,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::Error::Sr25519VerifyFailed));
}
}
}

0 comments on commit 6329cca

Please sign in to comment.