diff --git a/crates/build/src/docker.rs b/crates/build/src/docker.rs index 95219d669..9d4d45ac4 100644 --- a/crates/build/src/docker.rs +++ b/crates/build/src/docker.rs @@ -27,11 +27,11 @@ //! 1. Pull the image from the registry or use the local copy if available //! 2. Parse other arguments that were passed to the host execution context //! 3. Calculate the digest of the command and use it -//! to uniquely identify the container +//! to uniquely identify the container //! 4. If the container exists, we just start the build, if not, we create it //! 5. After the build, the docker container produces metadata with -//! paths relative to its internal storage structure, we parse the file -//! and overwrite those paths relative to the host machine. +//! paths relative to its internal storage structure, we parse the file +//! and overwrite those paths relative to the host machine. use std::{ cmp::Ordering, diff --git a/crates/build/src/lib.rs b/crates/build/src/lib.rs index 6048f0248..24570ee19 100644 --- a/crates/build/src/lib.rs +++ b/crates/build/src/lib.rs @@ -727,13 +727,9 @@ pub fn execute(args: ExecuteArgs) -> Result { Some(opt_passes) => *opt_passes, None => { let mut manifest = Manifest::new(manifest_path.clone())?; - - match manifest.profile_optimization_passes() { - // if no setting is found, neither on the cli nor in the profile, - // then we use the default - None => OptimizationPasses::default(), - Some(opt_passes) => opt_passes, - } + // if no setting is found, neither on the cli nor in the profile, + // then we use the default + manifest.profile_optimization_passes().unwrap_or_default() } }; diff --git a/crates/extrinsics/src/events.rs b/crates/extrinsics/src/events.rs index 447fe5f75..48f0fb24f 100644 --- a/crates/extrinsics/src/events.rs +++ b/crates/extrinsics/src/events.rs @@ -184,12 +184,14 @@ pub struct Event { /// Events produced from invoking a contract extrinsic. #[derive(serde::Serialize)] +#[allow(dead_code)] pub struct Events(Vec); /// Displays events produced from invoking a contract extrinsic. #[derive(serde::Serialize)] pub struct DisplayEvents(Vec); +#[allow(clippy::needless_borrows_for_generic_args)] impl DisplayEvents { /// Parses events and returns an object which can be serialised pub fn from_events( @@ -331,6 +333,7 @@ impl DisplayEvents { /// Construct the contract event data field, attempting to decode the event using the /// [`ContractMessageTranscoder`] if available. +#[allow(clippy::needless_borrows_for_generic_args)] fn contract_event_data_field( transcoder: Option<&ContractMessageTranscoder>, field_metadata: &scale_info::Field, diff --git a/crates/transcode/src/lib.rs b/crates/transcode/src/lib.rs index 90710b7e1..fa7ab7083 100644 --- a/crates/transcode/src/lib.rs +++ b/crates/transcode/src/lib.rs @@ -513,7 +513,7 @@ mod tests { use crate::scon::Hex; - #[allow(clippy::extra_unused_lifetimes)] + #[allow(clippy::extra_unused_lifetimes, unexpected_cfgs, non_local_definitions)] #[ink::contract] pub mod transcode { #[ink(storage)] diff --git a/crates/transcode/src/transcoder.rs b/crates/transcode/src/transcoder.rs index 87a8f8c9f..ddf27cce0 100644 --- a/crates/transcode/src/transcoder.rs +++ b/crates/transcode/src/transcoder.rs @@ -275,31 +275,31 @@ mod tests { #[test] fn transcode_integers() -> Result<()> { - transcode_roundtrip::("-128", Value::Int(i8::min_value().into()))?; - transcode_roundtrip::("127", Value::Int(i8::max_value().into()))?; + transcode_roundtrip::("-128", Value::Int(i8::MIN.into()))?; + transcode_roundtrip::("127", Value::Int(i8::MAX.into()))?; - transcode_roundtrip::("-32768", Value::Int(i16::min_value().into()))?; - transcode_roundtrip::("32767", Value::Int(i16::max_value().into()))?; + transcode_roundtrip::("-32768", Value::Int(i16::MIN.into()))?; + transcode_roundtrip::("32767", Value::Int(i16::MAX.into()))?; - transcode_roundtrip::("-2147483648", Value::Int(i32::min_value().into()))?; - transcode_roundtrip::("2147483647", Value::Int(i32::max_value().into()))?; + transcode_roundtrip::("-2147483648", Value::Int(i32::MIN.into()))?; + transcode_roundtrip::("2147483647", Value::Int(i32::MAX.into()))?; transcode_roundtrip::( "-9223372036854775808", - Value::Int(i64::min_value().into()), + Value::Int(i64::MIN.into()), )?; transcode_roundtrip::( "\"9_223_372_036_854_775_807\"", - Value::Int(i64::max_value().into()), + Value::Int(i64::MAX.into()), )?; transcode_roundtrip::( "-170141183460469231731687303715884105728", - Value::Int(i128::min_value()), + Value::Int(i128::MIN), )?; transcode_roundtrip::( "\"170141183460469231731687303715884105727\"", - Value::Int(i128::max_value()), + Value::Int(i128::MAX), ) }