From a40fab1773e6113e16bff9d4257ce1a7443aa77a Mon Sep 17 00:00:00 2001 From: Alexander Gryaznov Date: Fri, 18 Feb 2022 13:20:37 +0300 Subject: [PATCH] fixed `wrong_self_convention` clippy warning for `is_` functions --- crates/env/src/backend.rs | 4 ++-- crates/env/src/engine/experimental_off_chain/impls.rs | 4 ++-- crates/env/src/engine/off_chain/impls.rs | 4 ++-- crates/env/src/engine/on_chain/impls.rs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/env/src/backend.rs b/crates/env/src/backend.rs index a1b5b6006ef..198282d9153 100644 --- a/crates/env/src/backend.rs +++ b/crates/env/src/backend.rs @@ -432,7 +432,7 @@ pub trait TypedEnvBackend: EnvBackend { /// # Note /// /// For more details visit: [`is_contract`][`crate::is_contract`] - fn is_contract(&mut self, account: &T::AccountId) -> bool + fn is_contract(&self, account: &T::AccountId) -> bool where T: Environment; @@ -441,7 +441,7 @@ pub trait TypedEnvBackend: EnvBackend { /// # Note /// /// For more details visit: [`caller_is_origin`][`crate::caller_is_origin`] - fn caller_is_origin(&mut self) -> bool + fn caller_is_origin(&self) -> bool where T: Environment; } diff --git a/crates/env/src/engine/experimental_off_chain/impls.rs b/crates/env/src/engine/experimental_off_chain/impls.rs index d701f3a295b..5cae2a3b634 100644 --- a/crates/env/src/engine/experimental_off_chain/impls.rs +++ b/crates/env/src/engine/experimental_off_chain/impls.rs @@ -461,7 +461,7 @@ impl TypedEnvBackend for EnvInstance { scale::Decode::decode(&mut &output[..]).map_err(Into::into) } - fn is_contract(&mut self, _account: &T::AccountId) -> bool + fn is_contract(&self, _account: &T::AccountId) -> bool where T: Environment, { @@ -469,7 +469,7 @@ impl TypedEnvBackend for EnvInstance { false } - fn caller_is_origin(&mut self) -> bool + fn caller_is_origin(&self) -> bool where T: Environment, { diff --git a/crates/env/src/engine/off_chain/impls.rs b/crates/env/src/engine/off_chain/impls.rs index a8365ed2077..ca1b3a65d59 100644 --- a/crates/env/src/engine/off_chain/impls.rs +++ b/crates/env/src/engine/off_chain/impls.rs @@ -471,7 +471,7 @@ impl TypedEnvBackend for EnvInstance { Ok((block.random::(subject)?, block.number::()?)) } - fn is_contract(&mut self, _account: &T::AccountId) -> bool + fn is_contract(&self, _account: &T::AccountId) -> bool where T: Environment, { @@ -479,7 +479,7 @@ impl TypedEnvBackend for EnvInstance { false } - fn caller_is_origin(&mut self) -> bool + fn caller_is_origin(&self) -> bool where T: Environment, { diff --git a/crates/env/src/engine/on_chain/impls.rs b/crates/env/src/engine/on_chain/impls.rs index 0c8d60a5426..8074c8004fa 100644 --- a/crates/env/src/engine/on_chain/impls.rs +++ b/crates/env/src/engine/on_chain/impls.rs @@ -491,7 +491,7 @@ impl TypedEnvBackend for EnvInstance { scale::Decode::decode(&mut &output[..]).map_err(Into::into) } - fn is_contract(&mut self, account_id: &T::AccountId) -> bool + fn is_contract(&self, account_id: &T::AccountId) -> bool where T: Environment, { @@ -500,7 +500,7 @@ impl TypedEnvBackend for EnvInstance { ext::is_contract(enc_account_id) } - fn caller_is_origin(&mut self) -> bool + fn caller_is_origin(&self) -> bool where T: Environment, {