Skip to content

Commit

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

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

/// A trivial contract with a single message, that uses `call-runtime` API for
/// performing native token transfer.
Expand All @@ -63,7 +66,9 @@ mod runtime_call {
impl From<EnvError> for RuntimeError {
fn from(e: EnvError) -> Self {
match e {
EnvError::ReturnError(ReturnErrorCode::CallRuntimeFailed) => RuntimeError::CallRuntimeFailed,
EnvError::ReturnError(ReturnErrorCode::CallRuntimeFailed) => {
RuntimeError::CallRuntimeFailed
}
_ => panic!("Unexpected error from `pallet-contracts`."),
}
}
Expand Down
8 changes: 5 additions & 3 deletions integration-tests/erc1155/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#![cfg_attr(not(feature = "std"), no_std, no_main)]

use ink::{
env::ReturnErrorCode,
prelude::vec::Vec,
primitives::AccountId,
env::ReturnErrorCode
};

// This is the return value that we expect if a smart contract supports receiving ERC-1155
Expand Down Expand Up @@ -415,8 +415,10 @@ mod erc1155 {
}
Err(e) => {
match e {
ink::env::Error::ReturnError(ReturnErrorCode::CodeNotFound | ReturnErrorCode::NotCallable)
=> {
ink::env::Error::ReturnError(
ReturnErrorCode::CodeNotFound
| ReturnErrorCode::NotCallable,
) => {
// Our recipient wasn't a smart contract, so there's
// nothing more for
// us to do
Expand Down
5 changes: 4 additions & 1 deletion integration-tests/sr25519-verification/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ pub mod sr25519_verification {
143,
];
let result = ink::env::sr25519_verify(&signature, &message, &public_key);
assert_eq!(result, Err(ink::env::ReturnErrorCode::Sr25519VerifyFailed.into()));
assert_eq!(
result,
Err(ink::env::ReturnErrorCode::Sr25519VerifyFailed.into())
);
}

#[ink::test]
Expand Down

0 comments on commit 824c29b

Please sign in to comment.