From f4965ab6604c016a4ed39c880d5000e11350061e Mon Sep 17 00:00:00 2001 From: Alexander Gryaznov Date: Mon, 20 Feb 2023 22:24:48 +0200 Subject: [PATCH 1/5] remove all `#[inline.*]` --- crates/allocator/src/bump.rs | 4 ---- crates/engine/src/ext.rs | 1 - crates/env/src/call/call_builder.rs | 9 --------- crates/env/src/call/common.rs | 7 ------- crates/env/src/call/create_builder.rs | 16 ---------------- crates/env/src/call/execution_input.rs | 15 --------------- crates/env/src/chain_extension.rs | 9 --------- crates/env/src/engine/on_chain/buffer.rs | 5 ----- crates/env/src/engine/on_chain/ext.rs | 11 ----------- crates/env/src/engine/on_chain/impls.rs | 3 --- crates/env/src/topics.rs | 2 -- crates/env/src/types.rs | 5 ----- .../src/generator/as_dependency/call_builder.rs | 8 -------- .../src/generator/as_dependency/contract_ref.rs | 8 -------- .../ink/codegen/src/generator/chain_extension.rs | 1 - .../src/generator/trait_def/call_builder.rs | 4 ---- .../src/generator/trait_def/call_forwarder.rs | 6 ------ crates/ink/ir/src/ir/attrs.rs | 2 -- crates/ink/macro/src/storage/storable.rs | 4 ---- crates/ink/macro/src/storage/tests/storable.rs | 12 ------------ crates/ink/src/codegen/dispatch/execution.rs | 1 - crates/ink/src/env_access.rs | 1 - crates/ink/src/reflect/dispatch.rs | 4 ---- crates/ink/src/result_info.rs | 2 -- .../ui/contract/pass/example-erc20-works.rs | 2 -- crates/primitives/src/types.rs | 4 ---- crates/storage/src/lazy/mapping.rs | 8 -------- crates/storage/src/lazy/mod.rs | 2 -- crates/storage/traits/src/storage.rs | 2 -- integration-tests/erc20/lib.rs | 4 ---- integration-tests/trait-erc20/lib.rs | 4 ---- 31 files changed, 166 deletions(-) diff --git a/crates/allocator/src/bump.rs b/crates/allocator/src/bump.rs index 719900faa75..3ce17a5e088 100644 --- a/crates/allocator/src/bump.rs +++ b/crates/allocator/src/bump.rs @@ -35,7 +35,6 @@ static mut INNER: InnerAlloc = InnerAlloc::new(); pub struct BumpAllocator; unsafe impl GlobalAlloc for BumpAllocator { - #[inline] unsafe fn alloc(&self, layout: Layout) -> *mut u8 { match INNER.alloc(layout) { Some(start) => start as *mut u8, @@ -43,7 +42,6 @@ unsafe impl GlobalAlloc for BumpAllocator { } } - #[inline] unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 { // A new page in Wasm is guaranteed to already be zero initialized, so we can just use our // regular `alloc` call here and save a bit of work. @@ -52,7 +50,6 @@ unsafe impl GlobalAlloc for BumpAllocator { self.alloc(layout) } - #[inline] unsafe fn dealloc(&self, _ptr: *mut u8, _layout: Layout) {} } @@ -142,7 +139,6 @@ impl InnerAlloc { /// This function rounds up to the next page. For example, if we have an allocation of /// `size = PAGE_SIZE / 2` this function will indicate that one page is required to satisfy /// the allocation. -#[inline] fn required_pages(size: usize) -> Option { size.checked_add(PAGE_SIZE - 1) .and_then(|num| num.checked_div(PAGE_SIZE)) diff --git a/crates/engine/src/ext.rs b/crates/engine/src/ext.rs index f6d302407c0..78ebf3d824d 100644 --- a/crates/engine/src/ext.rs +++ b/crates/engine/src/ext.rs @@ -57,7 +57,6 @@ macro_rules! define_error_codes { } impl From for Result { - #[inline] fn from(return_code: ReturnCode) -> Self { match return_code.0 { 0 => Ok(()), diff --git a/crates/env/src/call/call_builder.rs b/crates/env/src/call/call_builder.rs index 3ea6c065c97..fb908987aab 100644 --- a/crates/env/src/call/call_builder.rs +++ b/crates/env/src/call/call_builder.rs @@ -53,13 +53,11 @@ where E: Environment, { /// Returns the call flags. - #[inline] pub fn call_flags(&self) -> &CallFlags { &self.call_flags } /// Returns the execution input. - #[inline] pub fn exec_input(&self) -> &ExecutionInput { &self.exec_input } @@ -70,19 +68,16 @@ where E: Environment, { /// Returns the account ID of the called contract instance. - #[inline] pub fn callee(&self) -> &E::AccountId { &self.call_type.callee } /// Returns the chosen gas limit for the called contract execution. - #[inline] pub fn gas_limit(&self) -> Gas { self.call_type.gas_limit } /// Returns the transferred value for the called contract. - #[inline] pub fn transferred_value(&self) -> &E::Balance { &self.call_type.transferred_value } @@ -93,7 +88,6 @@ where E: Environment, { /// Returns the code hash which we use to perform a delegate call. - #[inline] pub fn code_hash(&self) -> &E::Hash { &self.call_type.code_hash } @@ -409,7 +403,6 @@ where E: Environment, { /// The type of the call. - #[inline] #[must_use] pub fn call_type( self, @@ -430,7 +423,6 @@ where E: Environment, { /// The flags used to change the behavior of the contract call. - #[inline] #[must_use] pub fn call_flags( self, @@ -456,7 +448,6 @@ where /// /// Either use `.returns::<()>` to signal that the call does not return a value /// or use `.returns::` to signal that the call returns a value of type `T`. - #[inline] pub fn returns(self) -> CallBuilder>> { CallBuilder { call_type: self.call_type, diff --git a/crates/env/src/call/common.rs b/crates/env/src/call/common.rs index e1cc4171a2d..22f066cd28b 100644 --- a/crates/env/src/call/common.rs +++ b/crates/env/src/call/common.rs @@ -23,7 +23,6 @@ use core::marker::PhantomData; pub struct ReturnType(PhantomData T>); impl Clone for ReturnType { - #[inline] fn clone(&self) -> Self { Self(Default::default()) } @@ -32,7 +31,6 @@ impl Clone for ReturnType { impl Copy for ReturnType {} impl Default for ReturnType { - #[inline] fn default() -> Self { Self(Default::default()) } @@ -44,7 +42,6 @@ pub struct Set(pub T); impl Set { /// Returns the set value. - #[inline] pub fn value(self) -> T { self.0 } @@ -55,7 +52,6 @@ impl Set { pub struct Unset(PhantomData T>); impl Clone for Unset { - #[inline] fn clone(&self) -> Self { Self(Default::default()) } @@ -64,7 +60,6 @@ impl Clone for Unset { impl Copy for Unset {} impl Default for Unset { - #[inline] fn default() -> Self { Self(Default::default()) } @@ -87,7 +82,6 @@ pub trait Unwrap { impl Unwrap for Unset { type Output = T; - #[inline] fn unwrap_or_else(self, f: F) -> Self::Output where F: FnOnce() -> Self::Output, @@ -99,7 +93,6 @@ impl Unwrap for Unset { impl Unwrap for Set { type Output = T; - #[inline] fn unwrap_or_else(self, _: F) -> Self::Output where F: FnOnce() -> Self::Output, diff --git a/crates/env/src/call/create_builder.rs b/crates/env/src/call/create_builder.rs index 123aca9c99b..2531e0742a5 100644 --- a/crates/env/src/call/create_builder.rs +++ b/crates/env/src/call/create_builder.rs @@ -188,25 +188,21 @@ where E: Environment, { /// The code hash of the contract. - #[inline] pub fn code_hash(&self) -> &E::Hash { &self.code_hash } /// The gas limit for the contract instantiation. - #[inline] pub fn gas_limit(&self) -> u64 { self.gas_limit } /// The endowment for the instantiated contract. - #[inline] pub fn endowment(&self) -> &E::Balance { &self.endowment } /// The raw encoded input data. - #[inline] pub fn exec_input(&self) -> &ExecutionInput { &self.exec_input } @@ -226,7 +222,6 @@ where Salt: AsRef<[u8]>, { /// The salt for determining the hash for the contract account ID. - #[inline] pub fn salt_bytes(&self) -> &Salt { &self.salt_bytes } @@ -247,7 +242,6 @@ where /// This method panics if it encounters an [`ink::env::Error`][`crate::Error`] or an /// [`ink::primitives::LangError`][`ink_primitives::LangError`]. If you want to handle those /// use the [`try_instantiate`][`CreateParams::try_instantiate`] method instead. - #[inline] pub fn instantiate(&self) -> >::Output { crate::instantiate_contract(self) .unwrap_or_else(|env_error| { @@ -265,7 +259,6 @@ where /// On failure this returns an outer [`ink::env::Error`][`crate::Error`] or inner /// [`ink::primitives::LangError`][`ink_primitives::LangError`], both of which can be handled /// by the caller. - #[inline] pub fn try_instantiate( &self, ) -> Result< @@ -444,7 +437,6 @@ where E: Environment, { /// Sets the used code hash for the contract instantiation. - #[inline] pub fn code_hash( self, code_hash: E::Hash, @@ -476,7 +468,6 @@ where E: Environment, { /// Sets the maximum allowed gas costs for the contract instantiation. - #[inline] pub fn gas_limit( self, gas_limit: u64, @@ -509,7 +500,6 @@ where E: Environment, { /// Sets the value transferred upon the execution of the call. - #[inline] pub fn endowment( self, endowment: E::Balance, @@ -550,7 +540,6 @@ where E: Environment, { /// Sets the value transferred upon the execution of the call. - #[inline] pub fn exec_input( self, exec_input: ExecutionInput, @@ -591,7 +580,6 @@ where E: Environment, { /// Sets the value transferred upon the execution of the call. - #[inline] pub fn salt_bytes( self, salt: Salt, @@ -643,7 +631,6 @@ where /// /// Therefore this must always be a reference (i.e `ContractRef`) to the contract you're trying /// to instantiate. - #[inline] pub fn returns( self, ) -> CreateBuilder< @@ -688,7 +675,6 @@ where GasLimit: Unwrap, { /// Finalizes the create builder, allowing it to instantiate a contract. - #[inline] pub fn params(self) -> CreateParams { CreateParams { code_hash: self.code_hash.value(), @@ -728,7 +714,6 @@ where /// This method panics if it encounters an [`ink::env::Error`][`crate::Error`] or an /// [`ink::primitives::LangError`][`ink_primitives::LangError`]. If you want to handle those /// use the [`try_instantiate`][`CreateBuilder::try_instantiate`] method instead. - #[inline] pub fn instantiate(self) -> >::Output { self.params().instantiate() } @@ -740,7 +725,6 @@ where /// On failure this returns an outer [`ink::env::Error`][`crate::Error`] or inner /// [`ink::primitives::LangError`][`ink_primitives::LangError`], both of which can be handled /// by the caller. - #[inline] pub fn try_instantiate( self, ) -> Result< diff --git a/crates/env/src/call/execution_input.rs b/crates/env/src/call/execution_input.rs index fb491468522..12911f632e8 100644 --- a/crates/env/src/call/execution_input.rs +++ b/crates/env/src/call/execution_input.rs @@ -25,7 +25,6 @@ pub struct ExecutionInput { impl ExecutionInput { /// Creates a new execution input with the given selector. - #[inline] pub fn new(selector: Selector) -> Self { Self { selector, @@ -34,7 +33,6 @@ impl ExecutionInput { } /// Pushes an argument to the execution input. - #[inline] pub fn push_arg( self, arg: T, @@ -51,7 +49,6 @@ impl ExecutionInput { impl ExecutionInput, Rest>> { /// Pushes an argument to the execution input. - #[inline] pub fn push_arg(self, arg: T) -> ExecutionInput>> where T: scale::Encode, @@ -102,7 +99,6 @@ pub struct Argument { impl Argument { /// Creates a new argument. - #[inline] fn new(arg: T) -> Self { Self { arg } } @@ -117,7 +113,6 @@ pub type EmptyArgumentList = ArgumentList; impl EmptyArgumentList { /// Creates a new empty argument list. - #[inline] pub fn empty() -> EmptyArgumentList { ArgumentList { head: ArgumentListEnd, @@ -126,7 +121,6 @@ impl EmptyArgumentList { } /// Pushes the first argument to the empty argument list. - #[inline] pub fn push_arg(self, arg: T) -> ArgumentList, Self> where T: scale::Encode, @@ -140,7 +134,6 @@ impl EmptyArgumentList { impl ArgumentList, Rest> { /// Pushes another argument to the argument list. - #[inline] pub fn push_arg(self, arg: T) -> ArgumentList, Self> where T: scale::Encode, @@ -156,24 +149,20 @@ impl scale::Encode for Argument where T: scale::Encode, { - #[inline] fn size_hint(&self) -> usize { ::size_hint(&self.arg) } - #[inline] fn encode_to(&self, output: &mut O) { ::encode_to(&self.arg, output) } } impl scale::Encode for EmptyArgumentList { - #[inline] fn size_hint(&self) -> usize { 0 } - #[inline] fn encode_to(&self, _output: &mut O) {} } @@ -182,12 +171,10 @@ where Head: scale::Encode, Rest: scale::Encode, { - #[inline] fn size_hint(&self) -> usize { scale::Encode::size_hint(&self.head) + scale::Encode::size_hint(&self.rest) } - #[inline] fn encode_to(&self, output: &mut O) { // We reverse the order of encoding because we build up the list of // arguments in reverse order, too. This way we encode the arguments @@ -202,12 +189,10 @@ impl scale::Encode for ExecutionInput where Args: scale::Encode, { - #[inline] fn size_hint(&self) -> usize { scale::Encode::size_hint(&self.selector) + scale::Encode::size_hint(&self.args) } - #[inline] fn encode_to(&self, output: &mut O) { scale::Encode::encode_to(&self.selector, output); scale::Encode::encode_to(&self.args, output); diff --git a/crates/env/src/chain_extension.rs b/crates/env/src/chain_extension.rs index 968418da1da..f85935d9a13 100644 --- a/crates/env/src/chain_extension.rs +++ b/crates/env/src/chain_extension.rs @@ -82,7 +82,6 @@ pub struct ChainExtensionMethod { impl ChainExtensionMethod<(), (), (), false> { /// Creates a new chain extension method instance. - #[inline] pub fn build(func_id: u32) -> Self { Self { func_id, @@ -101,7 +100,6 @@ impl /// `I` represents the input type of the chain extension method. /// All tuple types that may act as input parameters for the chain extension method are valid. /// Examples include `()`, `i32`, `(u8, [u8; 5], i32)`, etc. - #[inline] pub fn input(self) -> ChainExtensionMethod where I: scale::Encode, @@ -123,7 +121,6 @@ impl ChainExtensionMethod { /// /// If `O` is incorrectly indicated as `Return`, /// the type will not satisfy trait bounds later in method builder pipeline. - #[inline] pub fn output( self, ) -> ChainExtensionMethod @@ -147,7 +144,6 @@ impl ChainExtensionMethod { /// code that represents failure. /// /// The output of the chain extension method call is always decoded and returned in this case. - #[inline] pub fn ignore_error_code( self, ) -> ChainExtensionMethod { @@ -163,7 +159,6 @@ impl ChainExtensionMethod { /// /// This will handle the returned status code and only loads and decodes the value /// returned as the output of the chain extension method call in case of success. - #[inline] pub fn handle_error_code( self, ) -> ChainExtensionMethod, IS_RESULT> @@ -243,7 +238,6 @@ where /// # fn from_status_code(status_code: u32) -> Result<(), Self> { Ok(()) } /// # } /// ``` - #[inline] pub fn call( self, input: &I, @@ -309,7 +303,6 @@ where /// # fn from(_error: scale::Error) -> Self { Self {} } /// # } /// ``` - #[inline] pub fn call( self, input: &I, @@ -378,7 +371,6 @@ where /// # fn from_status_code(status_code: u32) -> Result<(), Self> { Ok(()) } /// # } /// ``` - #[inline] pub fn call(self, input: &I) -> Result { ::on_instance(|instance| { EnvBackend::call_chain_extension::( @@ -427,7 +419,6 @@ where /// .ignore_error_code() /// .call(&(true, 42)); /// ``` - #[inline] pub fn call(self, input: &I) -> O { ::on_instance(|instance| { EnvBackend::call_chain_extension::( diff --git a/crates/env/src/engine/on_chain/buffer.rs b/crates/env/src/engine/on_chain/buffer.rs index 1d74f904a0a..61cfec9d372 100644 --- a/crates/env/src/engine/on_chain/buffer.rs +++ b/crates/env/src/engine/on_chain/buffer.rs @@ -33,14 +33,12 @@ impl StaticBuffer { impl core::ops::Index for StaticBuffer { type Output = [u8]; - #[inline(always)] fn index(&self, index: core::ops::RangeFull) -> &Self::Output { core::ops::Index::index(&self.buffer[..], index) } } impl core::ops::IndexMut for StaticBuffer { - #[inline(always)] fn index_mut(&mut self, index: core::ops::RangeFull) -> &mut Self::Output { core::ops::IndexMut::index_mut(&mut self.buffer[..], index) } @@ -148,7 +146,6 @@ impl<'a> ScopedBuffer<'a> { /// Encode the given value into the scoped buffer and return the sub slice /// containing all the encoded bytes. - #[inline(always)] pub fn take_encoded(&mut self, value: &T) -> &'a mut [u8] where T: scale::Encode, @@ -164,7 +161,6 @@ impl<'a> ScopedBuffer<'a> { /// Encode the given storable value into the scoped buffer and return the sub slice /// containing all the encoded bytes. - #[inline(always)] pub fn take_storable_encoded(&mut self, value: &T) -> &'a mut [u8] where T: ink_storage_traits::Storable, @@ -183,7 +179,6 @@ impl<'a> ScopedBuffer<'a> { /// Does not return the buffer immediately so that other values can be appended /// afterwards. The [`take_appended`] method shall be used to return the buffer /// that includes all appended encodings as a single buffer. - #[inline(always)] pub fn append_encoded(&mut self, value: &T) where T: scale::Encode, diff --git a/crates/env/src/engine/on_chain/ext.rs b/crates/env/src/engine/on_chain/ext.rs index 7af0d5d4b67..43268642036 100644 --- a/crates/env/src/engine/on_chain/ext.rs +++ b/crates/env/src/engine/on_chain/ext.rs @@ -38,7 +38,6 @@ macro_rules! define_error_codes { } impl From for Result { - #[inline] fn from(return_code: ReturnCode) -> Self { match return_code.0 { 0 => Ok(()), @@ -419,14 +418,12 @@ mod sys { } } -#[inline(always)] fn extract_from_slice(output: &mut &mut [u8], new_len: usize) { debug_assert!(new_len <= output.len()); let tmp = core::mem::take(output); *output = &mut tmp[..new_len]; } -#[inline(always)] pub fn instantiate( code_hash: &[u8], gas_limit: u64, @@ -460,7 +457,6 @@ pub fn instantiate( ret_code.into() } -#[inline(always)] pub fn call( flags: u32, callee: &[u8], @@ -488,7 +484,6 @@ pub fn call( ret_code.into() } -#[inline(always)] pub fn delegate_call( flags: u32, code_hash: &[u8], @@ -553,7 +548,6 @@ pub fn clear_storage(key: &[u8]) -> Option { ret_code.into() } -#[inline(always)] pub fn get_storage(key: &[u8], output: &mut &mut [u8]) -> Result { let mut output_len = output.len() as u32; let ret_code = { @@ -570,7 +564,6 @@ pub fn get_storage(key: &[u8], output: &mut &mut [u8]) -> Result { ret_code.into() } -#[inline(always)] pub fn take_storage(key: &[u8], output: &mut &mut [u8]) -> Result { let mut output_len = output.len() as u32; let ret_code = { @@ -597,7 +590,6 @@ pub fn terminate(beneficiary: &[u8]) -> ! { unsafe { sys::terminate(Ptr32::from_slice(beneficiary)) } } -#[inline(always)] pub fn call_chain_extension(func_id: u32, input: &[u8], output: &mut &mut [u8]) -> u32 { let mut output_len = output.len() as u32; let ret_code = { @@ -615,7 +607,6 @@ pub fn call_chain_extension(func_id: u32, input: &[u8], output: &mut &mut [u8]) ret_code.into_u32() } -#[inline(always)] pub fn input(output: &mut &mut [u8]) { let mut output_len = output.len() as u32; { @@ -642,7 +633,6 @@ pub fn return_value(flags: ReturnFlags, return_value: &[u8]) -> ! { macro_rules! impl_wrapper_for { ( $( $name:ident, )* ) => { $( - #[inline(always)] pub fn $name(output: &mut &mut [u8]) { let mut output_len = output.len() as u32; { @@ -668,7 +658,6 @@ impl_wrapper_for! { minimum_balance, } -#[inline(always)] pub fn weight_to_fee(gas: u64, output: &mut &mut [u8]) { let mut output_len = output.len() as u32; { diff --git a/crates/env/src/engine/on_chain/impls.rs b/crates/env/src/engine/on_chain/impls.rs index ae9fa3fdb1b..d140ca1dfa7 100644 --- a/crates/env/src/engine/on_chain/impls.rs +++ b/crates/env/src/engine/on_chain/impls.rs @@ -176,7 +176,6 @@ where } impl EnvInstance { - #[inline(always)] /// Returns a new scoped buffer for the entire scope of the static 16 kB buffer. fn scoped_buffer(&mut self) -> ScopedBuffer { ScopedBuffer::from(&mut self.buffer[..]) @@ -187,7 +186,6 @@ impl EnvInstance { /// # Note /// /// This skips the potentially costly decoding step that is often equivalent to a `memcpy`. - #[inline(always)] fn get_property_little_endian(&mut self, ext_fn: fn(output: &mut &mut [u8])) -> T where T: FromLittleEndian, @@ -198,7 +196,6 @@ impl EnvInstance { } /// Returns the contract property value. - #[inline(always)] fn get_property(&mut self, ext_fn: fn(output: &mut &mut [u8])) -> Result where T: scale::Decode, diff --git a/crates/env/src/topics.rs b/crates/env/src/topics.rs index 16a862b6c9a..04d3d9cda8d 100644 --- a/crates/env/src/topics.rs +++ b/crates/env/src/topics.rs @@ -223,12 +223,10 @@ impl scale::Encode for PrefixedValue<'_, '_, X> where X: scale::Encode, { - #[inline] fn size_hint(&self) -> usize { self.prefix.size_hint() + self.value.size_hint() } - #[inline] fn encode_to(&self, dest: &mut T) { self.prefix.encode_to(dest); self.value.encode_to(dest); diff --git a/crates/env/src/types.rs b/crates/env/src/types.rs index 9f5fa220753..85b71fc01c4 100644 --- a/crates/env/src/types.rs +++ b/crates/env/src/types.rs @@ -52,7 +52,6 @@ pub trait FromLittleEndian { impl FromLittleEndian for u8 { type Bytes = [u8; 1]; - #[inline] fn from_le_bytes(bytes: Self::Bytes) -> Self { u8::from_le_bytes(bytes) } @@ -61,7 +60,6 @@ impl FromLittleEndian for u8 { impl FromLittleEndian for u16 { type Bytes = [u8; 2]; - #[inline] fn from_le_bytes(bytes: Self::Bytes) -> Self { u16::from_le_bytes(bytes) } @@ -70,7 +68,6 @@ impl FromLittleEndian for u16 { impl FromLittleEndian for u32 { type Bytes = [u8; 4]; - #[inline] fn from_le_bytes(bytes: Self::Bytes) -> Self { u32::from_le_bytes(bytes) } @@ -79,7 +76,6 @@ impl FromLittleEndian for u32 { impl FromLittleEndian for u64 { type Bytes = [u8; 8]; - #[inline] fn from_le_bytes(bytes: Self::Bytes) -> Self { u64::from_le_bytes(bytes) } @@ -88,7 +84,6 @@ impl FromLittleEndian for u64 { impl FromLittleEndian for u128 { type Bytes = [u8; 16]; - #[inline] fn from_le_bytes(bytes: Self::Bytes) -> Self { u128::from_le_bytes(bytes) } diff --git a/crates/ink/codegen/src/generator/as_dependency/call_builder.rs b/crates/ink/codegen/src/generator/as_dependency/call_builder.rs index fe5f09feafe..a20635e46ab 100644 --- a/crates/ink/codegen/src/generator/as_dependency/call_builder.rs +++ b/crates/ink/codegen/src/generator/as_dependency/call_builder.rs @@ -120,14 +120,12 @@ impl CallBuilder<'_> { let cb_ident = Self::call_builder_ident(); quote_spanned!(span=> impl ::ink::env::call::FromAccountId for #cb_ident { - #[inline] fn from_account_id(account_id: AccountId) -> Self { Self { account_id } } } impl ::ink::ToAccountId for #cb_ident { - #[inline] fn to_account_id(&self) -> AccountId { ::clone(&self.account_id) } @@ -186,7 +184,6 @@ impl CallBuilder<'_> { impl ::ink::codegen::TraitCallForwarderFor<{#trait_info_id}> for #cb_ident { type Forwarder = <::__ink_TraitInfo as ::ink::codegen::TraitCallForwarder>::Forwarder; - #[inline] fn forward(&self) -> &Self::Forwarder { // SAFETY: // @@ -199,7 +196,6 @@ impl CallBuilder<'_> { } } - #[inline] fn forward_mut(&mut self) -> &mut Self::Forwarder { // SAFETY: // @@ -212,14 +208,12 @@ impl CallBuilder<'_> { } } - #[inline] fn build(&self) -> &::Builder { <_ as ::ink::codegen::TraitCallBuilder>::call( >::forward(self) ) } - #[inline] fn build_mut(&mut self) -> &mut ::Builder { @@ -289,7 +283,6 @@ impl CallBuilder<'_> { as ::ink::codegen::TraitCallBuilder>::Builder as #trait_path>::#output_ident; - #[inline] #( #attrs )* fn #message_ident( & #mut_token self @@ -385,7 +378,6 @@ impl CallBuilder<'_> { quote_spanned!(span=> #( #attrs )* #[allow(clippy::type_complexity)] - #[inline] pub fn #message_ident( & #mut_tok self #( , #input_bindings : #input_types )* diff --git a/crates/ink/codegen/src/generator/as_dependency/contract_ref.rs b/crates/ink/codegen/src/generator/as_dependency/contract_ref.rs index 26ee2f58e57..4b08b6bc78f 100644 --- a/crates/ink/codegen/src/generator/as_dependency/contract_ref.rs +++ b/crates/ink/codegen/src/generator/as_dependency/contract_ref.rs @@ -154,7 +154,6 @@ impl ContractRef<'_> { let ref_ident = self.generate_contract_ref_ident(); quote_spanned!(span=> impl ::ink::env::call::FromAccountId for #ref_ident { - #[inline] fn from_account_id(account_id: AccountId) -> Self { Self { inner: <<#storage_ident as ::ink::codegen::ContractCallBuilder>::Type @@ -164,7 +163,6 @@ impl ContractRef<'_> { } impl ::ink::ToAccountId for #ref_ident { - #[inline] fn to_account_id(&self) -> AccountId { <<#storage_ident as ::ink::codegen::ContractCallBuilder>::Type as ::ink::ToAccountId>::to_account_id(&self.inner) @@ -186,12 +184,10 @@ impl ContractRef<'_> { impl ::ink::codegen::TraitCallBuilder for #ref_ident { type Builder = <#storage_ident as ::ink::codegen::ContractCallBuilder>::Type; - #[inline] fn call(&self) -> &Self::Builder { &self.inner } - #[inline] fn call_mut(&mut self) -> &mut Self::Builder { &mut self.inner } @@ -285,7 +281,6 @@ impl ContractRef<'_> { type #output_ident = <::Forwarder as #trait_path>::#output_ident; - #[inline] fn #message_ident( & #mut_token self #( , #input_bindings : #input_types )* @@ -376,7 +371,6 @@ impl ContractRef<'_> { let wrapped_output_type = message.wrapped_output(); quote_spanned!(span=> #( #attrs )* - #[inline] pub fn #message_ident( & #mut_token self #( , #input_bindings : #input_types )* @@ -391,7 +385,6 @@ impl ContractRef<'_> { } #( #attrs )* - #[inline] pub fn #try_message_ident( & #mut_token self #( , #input_bindings : #input_types )* @@ -437,7 +430,6 @@ impl ContractRef<'_> { .unwrap_or_else(|| quote::quote! { Self }); quote_spanned!(span => #( #attrs )* - #[inline] #[allow(clippy::type_complexity)] pub fn #constructor_ident( #( #input_bindings : #input_types ),* diff --git a/crates/ink/codegen/src/generator/chain_extension.rs b/crates/ink/codegen/src/generator/chain_extension.rs index 8f36e838eec..e174137165c 100644 --- a/crates/ink/codegen/src/generator/chain_extension.rs +++ b/crates/ink/codegen/src/generator/chain_extension.rs @@ -105,7 +105,6 @@ impl ChainExtension<'_> { quote_spanned!(span=> #( #attrs )* - #[inline] pub fn #ident(self, #inputs) -> #return_type where #where_output_impls_from_error_code diff --git a/crates/ink/codegen/src/generator/trait_def/call_builder.rs b/crates/ink/codegen/src/generator/trait_def/call_builder.rs index 69db77bb431..70d0a969fe2 100644 --- a/crates/ink/codegen/src/generator/trait_def/call_builder.rs +++ b/crates/ink/codegen/src/generator/trait_def/call_builder.rs @@ -175,7 +175,6 @@ impl CallBuilder<'_> { E: ::ink::env::Environment, ::AccountId: ::core::clone::Clone, { - #[inline] fn clone(&self) -> Self { Self { account_id: ::core::clone::Clone::clone(&self.account_id), @@ -213,7 +212,6 @@ impl CallBuilder<'_> { where E: ::ink::env::Environment, { - #[inline] fn from_account_id(account_id: ::AccountId) -> Self { Self { account_id } } @@ -223,7 +221,6 @@ impl CallBuilder<'_> { where E: ::ink::env::Environment, { - #[inline] fn to_account_id(&self) -> ::AccountId { <::AccountId as ::core::clone::Clone>::clone(&self.account_id) } @@ -313,7 +310,6 @@ impl CallBuilder<'_> { >; #( #attrs )* - #[inline] fn #message_ident( & #mut_tok self #( , #input_bindings : #input_types )* diff --git a/crates/ink/codegen/src/generator/trait_def/call_forwarder.rs b/crates/ink/codegen/src/generator/trait_def/call_forwarder.rs index 662963e4e9c..c244e2fce84 100644 --- a/crates/ink/codegen/src/generator/trait_def/call_forwarder.rs +++ b/crates/ink/codegen/src/generator/trait_def/call_forwarder.rs @@ -168,7 +168,6 @@ impl CallForwarder<'_> { E: ::ink::env::Environment, ::AccountId: ::core::clone::Clone, { - #[inline] fn clone(&self) -> Self { Self { builder: <::Builder @@ -206,7 +205,6 @@ impl CallForwarder<'_> { where E: ::ink::env::Environment, { - #[inline] fn from_account_id(account_id: ::AccountId) -> Self { Self { builder: <::Builder as ::ink::env::call::FromAccountId>::from_account_id(account_id) } @@ -217,7 +215,6 @@ impl CallForwarder<'_> { where E: ::ink::env::Environment, { - #[inline] fn to_account_id(&self) -> ::AccountId { <::Builder as ::ink::ToAccountId>::to_account_id(&self.builder) @@ -248,12 +245,10 @@ impl CallForwarder<'_> { { type Builder = #call_builder_ident; - #[inline] fn call(&self) -> &::Builder { &self.builder } - #[inline] fn call_mut(&mut self) -> &mut ::Builder { &mut self.builder } @@ -343,7 +338,6 @@ impl CallForwarder<'_> { type #output_ident = #output_type; #( #attrs )* - #[inline] fn #message_ident( & #mut_tok self #( , #input_bindings : #input_types )* diff --git a/crates/ink/ir/src/ir/attrs.rs b/crates/ink/ir/src/ir/attrs.rs index db75a68e9db..11a0971c34d 100644 --- a/crates/ink/ir/src/ir/attrs.rs +++ b/crates/ink/ir/src/ir/attrs.rs @@ -1031,12 +1031,10 @@ mod tests { assert!(contains_ink_attributes(&[syn::parse_quote! { #[ink] }])); assert!(contains_ink_attributes(&[syn::parse_quote! { #[ink(..)] }])); assert!(contains_ink_attributes(&[ - syn::parse_quote! { #[inline] }, syn::parse_quote! { #[likely] }, syn::parse_quote! { #[ink(storage)] }, ])); assert!(!contains_ink_attributes(&[ - syn::parse_quote! { #[inline] }, syn::parse_quote! { #[likely] }, ])); } diff --git a/crates/ink/macro/src/storage/storable.rs b/crates/ink/macro/src/storage/storable.rs index 4b273cb9e44..8dc8505b92e 100644 --- a/crates/ink/macro/src/storage/storable.rs +++ b/crates/ink/macro/src/storage/storable.rs @@ -39,13 +39,11 @@ fn storable_struct_derive(s: &synstructure::Structure) -> TokenStream2 { s.gen_impl(quote! { gen impl ::ink::storage::traits::Storable for @Self { - #[inline(always)] #[allow(non_camel_case_types)] fn decode<__ink_I: ::scale::Input>(__input: &mut __ink_I) -> ::core::result::Result { ::core::result::Result::Ok(#decode_body) } - #[inline(always)] #[allow(non_camel_case_types)] fn encode<__ink_O: ::scale::Output + ?::core::marker::Sized>(&self, __dest: &mut __ink_O) { match self { #encode_body } @@ -110,7 +108,6 @@ fn storable_enum_derive(s: &synstructure::Structure) -> TokenStream2 { }); s.gen_impl(quote! { gen impl ::ink::storage::traits::Storable for @Self { - #[inline(always)] #[allow(non_camel_case_types)] fn decode<__ink_I: ::scale::Input>(__input: &mut __ink_I) -> ::core::result::Result { ::core::result::Result::Ok( @@ -121,7 +118,6 @@ fn storable_enum_derive(s: &synstructure::Structure) -> TokenStream2 { ) } - #[inline(always)] #[allow(non_camel_case_types)] fn encode<__ink_O: ::scale::Output + ?::core::marker::Sized>(&self, __dest: &mut __ink_O) { match self { diff --git a/crates/ink/macro/src/storage/tests/storable.rs b/crates/ink/macro/src/storage/tests/storable.rs index 46f17a914e3..4420fcf1866 100644 --- a/crates/ink/macro/src/storage/tests/storable.rs +++ b/crates/ink/macro/src/storage/tests/storable.rs @@ -31,13 +31,11 @@ fn unit_struct_works() { expands to { const _: () = { impl ::ink::storage::traits::Storable for UnitStruct { - #[inline(always)] #[allow(non_camel_case_types)] fn decode<__ink_I: ::scale::Input>(__input: &mut __ink_I) -> ::core::result::Result { ::core::result::Result::Ok(UnitStruct) } - #[inline(always)] #[allow(non_camel_case_types)] fn encode<__ink_O: ::scale::Output + ?::core::marker::Sized>(&self, __dest: &mut __ink_O) { match self { @@ -63,7 +61,6 @@ fn struct_works() { expands to { const _: () = { impl ::ink::storage::traits::Storable for NamedFields { - #[inline(always)] #[allow(non_camel_case_types)] fn decode<__ink_I: ::scale::Input>(__input: &mut __ink_I) -> ::core::result::Result { ::core::result::Result::Ok( @@ -75,7 +72,6 @@ fn struct_works() { ) } - #[inline(always)] #[allow(non_camel_case_types)] fn encode<__ink_O: ::scale::Output + ?::core::marker::Sized>(&self, __dest: &mut __ink_O) { match self { @@ -123,7 +119,6 @@ fn one_variant_enum_works() { expands to { const _: () = { impl ::ink::storage::traits::Storable for OneVariantEnum { - #[inline(always)] #[allow(non_camel_case_types)] fn decode<__ink_I: ::scale::Input>(__input: &mut __ink_I) -> ::core::result::Result { ::core::result::Result::Ok( @@ -135,7 +130,6 @@ fn one_variant_enum_works() { ) } - #[inline(always)] #[allow(non_camel_case_types)] fn encode<__ink_O: ::scale::Output + ?::core::marker::Sized>(&self, __dest: &mut __ink_O) { match self { @@ -168,7 +162,6 @@ fn enum_works() { expands to { const _: () = { impl ::ink::storage::traits::Storable for MixedEnum { - #[inline(always)] #[allow(non_camel_case_types)] fn decode<__ink_I: ::scale::Input>(__input: &mut __ink_I) -> ::core::result::Result { ::core::result::Result::Ok( @@ -188,7 +181,6 @@ fn enum_works() { ) } - #[inline(always)] #[allow(non_camel_case_types)] fn encode<__ink_O: ::scale::Output + ?::core::marker::Sized>(&self, __dest: &mut __ink_O) { match self { @@ -272,7 +264,6 @@ fn generic_struct_works() { T1: ::ink::storage::traits::Storable, (T1 , T2): ::ink::storage::traits::Storable { - #[inline(always)] #[allow(non_camel_case_types)] fn decode<__ink_I: ::scale::Input>(__input: &mut __ink_I) -> ::core::result::Result { ::core::result::Result::Ok( @@ -287,7 +278,6 @@ fn generic_struct_works() { ) } - #[inline(always)] #[allow(non_camel_case_types)] fn encode<__ink_O: ::scale::Output + ?::core::marker::Sized>(&self, __dest: &mut __ink_O) { match self { @@ -332,7 +322,6 @@ fn generic_enum_works() { T1: ::ink::storage::traits::Storable, T2: ::ink::storage::traits::Storable { - #[inline(always)] #[allow(non_camel_case_types)] fn decode<__ink_I: ::scale::Input>(__input: &mut __ink_I) -> ::core::result::Result { ::core::result::Result::Ok( @@ -351,7 +340,6 @@ fn generic_enum_works() { ) } - #[inline(always)] #[allow(non_camel_case_types)] fn encode<__ink_O: ::scale::Output + ?::core::marker::Sized>(&self, __dest: &mut __ink_O) { match self { diff --git a/crates/ink/src/codegen/dispatch/execution.rs b/crates/ink/src/codegen/dispatch/execution.rs index 2036999b147..7deec484e10 100644 --- a/crates/ink/src/codegen/dispatch/execution.rs +++ b/crates/ink/src/codegen/dispatch/execution.rs @@ -20,7 +20,6 @@ use ink_env::Environment; /// # Errors /// /// If the caller did send some amount of transferred value to the callee. -#[inline] pub fn deny_payment() -> Result<(), DispatchError> where E: Environment, diff --git a/crates/ink/src/env_access.rs b/crates/ink/src/env_access.rs index 04c33f4c92c..6542247275e 100644 --- a/crates/ink/src/env_access.rs +++ b/crates/ink/src/env_access.rs @@ -43,7 +43,6 @@ pub struct EnvAccess<'a, E> { } impl<'a, E> Default for EnvAccess<'a, E> { - #[inline] fn default() -> Self { Self { marker: Default::default(), diff --git a/crates/ink/src/reflect/dispatch.rs b/crates/ink/src/reflect/dispatch.rs index 111deeb261e..e33140e1418 100644 --- a/crates/ink/src/reflect/dispatch.rs +++ b/crates/ink/src/reflect/dispatch.rs @@ -410,7 +410,6 @@ impl private::Sealed for ConstructorOutputValue {} impl ConstructorOutput for ConstructorOutputValue { type Error = &'static (); - #[inline(always)] fn as_result(&self) -> Result<&C, &Self::Error> { Ok(&self.0) } @@ -420,7 +419,6 @@ impl ConstructorOutput for ConstructorOutputValue> { const IS_RESULT: bool = true; type Error = E; - #[inline(always)] fn as_result(&self) -> Result<&C, &Self::Error> { self.0.as_ref() } @@ -617,7 +615,6 @@ impl Display for DispatchError { impl DispatchError { /// Returns a string representation of the error. - #[inline] fn as_str(&self) -> &'static str { match self { Self::InvalidSelector => "unable to decode selector", @@ -630,7 +627,6 @@ impl DispatchError { } impl From for scale::Error { - #[inline] fn from(error: DispatchError) -> Self { Self::from(error.as_str()) } diff --git a/crates/ink/src/result_info.rs b/crates/ink/src/result_info.rs index 138405498ce..ffcb530a339 100644 --- a/crates/ink/src/result_info.rs +++ b/crates/ink/src/result_info.rs @@ -44,7 +44,6 @@ macro_rules! is_result_type { pub struct IsResultErr<'lt, T>(pub &'lt T); impl IsResultErr<'_, ::core::result::Result> { - #[inline] // We need to allow for dead code at this point because // the Rust compiler thinks this function is unused even // though it acts as the specialized case for detection. @@ -55,7 +54,6 @@ impl IsResultErr<'_, ::core::result::Result> { } pub trait IsResultErrFallback { - #[inline] fn value(&self) -> bool { false } diff --git a/crates/ink/tests/ui/contract/pass/example-erc20-works.rs b/crates/ink/tests/ui/contract/pass/example-erc20-works.rs index 6ef1b98e10f..0e376132e5b 100644 --- a/crates/ink/tests/ui/contract/pass/example-erc20-works.rs +++ b/crates/ink/tests/ui/contract/pass/example-erc20-works.rs @@ -90,7 +90,6 @@ mod erc20 { /// /// Prefer to call this method over `balance_of` since this /// works using references which are more efficient in Wasm. - #[inline] fn balance_of_impl(&self, owner: &AccountId) -> Balance { self.balances.get(owner).unwrap_or_default() } @@ -111,7 +110,6 @@ mod erc20 { /// /// Prefer to call this method over `allowance` since this /// works using references which are more efficient in Wasm. - #[inline] fn allowance_impl(&self, owner: &AccountId, spender: &AccountId) -> Balance { self.allowances.get((owner, spender)).unwrap_or_default() } diff --git a/crates/primitives/src/types.rs b/crates/primitives/src/types.rs index bd369290a80..852a09d25ea 100644 --- a/crates/primitives/src/types.rs +++ b/crates/primitives/src/types.rs @@ -34,28 +34,24 @@ use scale_info::TypeInfo; pub struct AccountId([u8; 32]); impl AsRef<[u8; 32]> for AccountId { - #[inline] fn as_ref(&self) -> &[u8; 32] { &self.0 } } impl AsMut<[u8; 32]> for AccountId { - #[inline] fn as_mut(&mut self) -> &mut [u8; 32] { &mut self.0 } } impl AsRef<[u8]> for AccountId { - #[inline] fn as_ref(&self) -> &[u8] { &self.0[..] } } impl AsMut<[u8]> for AccountId { - #[inline] fn as_mut(&mut self) -> &mut [u8] { &mut self.0[..] } diff --git a/crates/storage/src/lazy/mapping.rs b/crates/storage/src/lazy/mapping.rs index a74d4e392c2..edb9a074ec4 100644 --- a/crates/storage/src/lazy/mapping.rs +++ b/crates/storage/src/lazy/mapping.rs @@ -131,7 +131,6 @@ where /// Insert the given `value` to the contract storage. /// /// Returns the size in bytes of the pre-existing value at the specified key if any. - #[inline] pub fn insert(&mut self, key: Q, value: &R) -> Option where Q: scale::EncodeLike, @@ -143,7 +142,6 @@ where /// Get the `value` at `key` from the contract storage. /// /// Returns `None` if no `value` exists at the given `key`. - #[inline] pub fn get(&self, key: Q) -> Option where Q: scale::EncodeLike, @@ -157,7 +155,6 @@ where /// Returns `None` if no `value` exists at the given `key`. /// **WARNING**: this method uses the [unstable interface](https://github.com/paritytech/substrate/tree/master/frame/contracts#unstable-interfaces), /// which is unsafe and normally is not available on production chains. - #[inline] pub fn take(&self, key: Q) -> Option where Q: scale::EncodeLike, @@ -169,7 +166,6 @@ where /// Get the size of a value stored at `key` in the contract storage. /// /// Returns `None` if no `value` exists at the given `key`. - #[inline] pub fn size(&self, key: Q) -> Option where Q: scale::EncodeLike, @@ -180,7 +176,6 @@ where /// Checks if a value is stored at the given `key` in the contract storage. /// /// Returns `None` if no `value` exists at the given `key`. - #[inline] pub fn contains(&self, key: Q) -> bool where Q: scale::EncodeLike, @@ -189,7 +184,6 @@ where } /// Clears the value at `key` from storage. - #[inline] pub fn remove(&self, key: Q) where Q: scale::EncodeLike, @@ -203,10 +197,8 @@ where V: Packed, KeyType: StorageKey, { - #[inline] fn encode(&self, _dest: &mut T) {} - #[inline] fn decode(_input: &mut I) -> Result { Ok(Default::default()) } diff --git a/crates/storage/src/lazy/mod.rs b/crates/storage/src/lazy/mod.rs index a9418eceba8..448e9650b33 100644 --- a/crates/storage/src/lazy/mod.rs +++ b/crates/storage/src/lazy/mod.rs @@ -164,10 +164,8 @@ impl Storable for Lazy where KeyType: StorageKey, { - #[inline(always)] fn encode(&self, _dest: &mut T) {} - #[inline(always)] fn decode(_input: &mut I) -> Result { Ok(Default::default()) } diff --git a/crates/storage/traits/src/storage.rs b/crates/storage/traits/src/storage.rs index 326adae7729..04c629a479a 100644 --- a/crates/storage/traits/src/storage.rs +++ b/crates/storage/traits/src/storage.rs @@ -33,12 +33,10 @@ impl

Storable for P where P: scale::Codec, { - #[inline] fn encode(&self, dest: &mut T) { scale::Encode::encode_to(self, dest) } - #[inline] fn decode(input: &mut I) -> Result { scale::Decode::decode(input) } diff --git a/integration-tests/erc20/lib.rs b/integration-tests/erc20/lib.rs index 1e34d09d286..02ad016a0e5 100644 --- a/integration-tests/erc20/lib.rs +++ b/integration-tests/erc20/lib.rs @@ -92,7 +92,6 @@ mod erc20 { /// /// Prefer to call this method over `balance_of` since this /// works using references which are more efficient in Wasm. - #[inline] fn balance_of_impl(&self, owner: &AccountId) -> Balance { self.balances.get(owner).unwrap_or_default() } @@ -113,7 +112,6 @@ mod erc20 { /// /// Prefer to call this method over `allowance` since this /// works using references which are more efficient in Wasm. - #[inline] fn allowance_impl(&self, owner: &AccountId, spender: &AccountId) -> Balance { self.allowances.get((owner, spender)).unwrap_or_default() } @@ -490,12 +488,10 @@ mod erc20 { where X: scale::Encode, { - #[inline] fn size_hint(&self) -> usize { self.prefix.size_hint() + self.value.size_hint() } - #[inline] fn encode_to(&self, dest: &mut T) { self.prefix.encode_to(dest); self.value.encode_to(dest); diff --git a/integration-tests/trait-erc20/lib.rs b/integration-tests/trait-erc20/lib.rs index ab1bffa4b5d..c586d9af2ed 100644 --- a/integration-tests/trait-erc20/lib.rs +++ b/integration-tests/trait-erc20/lib.rs @@ -205,7 +205,6 @@ mod erc20 { /// /// Prefer to call this method over `balance_of` since this /// works using references which are more efficient in Wasm. - #[inline] fn balance_of_impl(&self, owner: &AccountId) -> Balance { self.balances.get(owner).unwrap_or_default() } @@ -218,7 +217,6 @@ mod erc20 { /// /// Prefer to call this method over `allowance` since this /// works using references which are more efficient in Wasm. - #[inline] fn allowance_impl(&self, owner: &AccountId, spender: &AccountId) -> Balance { self.allowances.get((owner, spender)).unwrap_or_default() } @@ -555,12 +553,10 @@ mod erc20 { where X: scale::Encode, { - #[inline] fn size_hint(&self) -> usize { self.prefix.size_hint() + self.value.size_hint() } - #[inline] fn encode_to(&self, dest: &mut T) { self.prefix.encode_to(dest); self.value.encode_to(dest); From 34eafe8ead193c4ac2ac7fd6f74b1700f10b002b Mon Sep 17 00:00:00 2001 From: Alexander Gryaznov Date: Tue, 28 Feb 2023 15:25:49 +0200 Subject: [PATCH 2/5] fmt --- crates/ink/ir/src/ir/attrs.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ink/ir/src/ir/attrs.rs b/crates/ink/ir/src/ir/attrs.rs index 11a0971c34d..a21cb561fb5 100644 --- a/crates/ink/ir/src/ir/attrs.rs +++ b/crates/ink/ir/src/ir/attrs.rs @@ -1034,9 +1034,9 @@ mod tests { syn::parse_quote! { #[likely] }, syn::parse_quote! { #[ink(storage)] }, ])); - assert!(!contains_ink_attributes(&[ - syn::parse_quote! { #[likely] }, - ])); + assert!(!contains_ink_attributes( + &[syn::parse_quote! { #[likely] },] + )); } /// Asserts that the given input yields the expected first argument or the From 33d0279ffef43b6b0de6e2bf371e9f465ba7f1b0 Mon Sep 17 00:00:00 2001 From: Alexander Gryaznov Date: Wed, 1 Mar 2023 14:50:07 +0200 Subject: [PATCH 3/5] tweak optimization options in profiles --- integration-tests/call-runtime/Cargo.toml | 4 ++++ integration-tests/contract-terminate/Cargo.toml | 4 ++++ integration-tests/contract-transfer/Cargo.toml | 4 ++++ integration-tests/custom-environment/Cargo.toml | 4 ++++ integration-tests/custom_allocator/Cargo.toml | 4 ++++ integration-tests/delegator/Cargo.toml | 4 ++++ integration-tests/delegator/accumulator/Cargo.toml | 4 ++++ integration-tests/delegator/adder/Cargo.toml | 4 ++++ integration-tests/delegator/subber/Cargo.toml | 4 ++++ integration-tests/dns/Cargo.toml | 4 ++++ integration-tests/erc1155/Cargo.toml | 4 ++++ integration-tests/erc20/Cargo.toml | 4 ++++ integration-tests/erc721/Cargo.toml | 4 ++++ integration-tests/flipper/Cargo.toml | 4 ++++ integration-tests/incrementer/Cargo.toml | 4 ++++ .../lang-err-integration-tests/call-builder/Cargo.toml | 4 ++++ .../constructors-return-value/Cargo.toml | 4 ++++ .../lang-err-integration-tests/contract-ref/Cargo.toml | 4 ++++ .../lang-err-integration-tests/integration-flipper/Cargo.toml | 4 ++++ integration-tests/mapping_integration_tests/Cargo.toml | 4 ++++ integration-tests/mother/Cargo.toml | 4 ++++ integration-tests/multisig/Cargo.toml | 4 ++++ integration-tests/payment-channel/Cargo.toml | 4 ++++ integration-tests/psp22-extension/Cargo.toml | 4 ++++ integration-tests/rand-extension/Cargo.toml | 4 ++++ integration-tests/trait-erc20/Cargo.toml | 4 ++++ integration-tests/trait-flipper/Cargo.toml | 4 ++++ integration-tests/trait-incrementer/Cargo.toml | 4 ++++ integration-tests/trait-incrementer/traits/Cargo.toml | 4 ++++ .../upgradeable-contracts/forward-calls/Cargo.toml | 4 ++++ .../upgradeable-contracts/set-code-hash/Cargo.toml | 4 ++++ .../set-code-hash/updated-incrementer/Cargo.toml | 4 ++++ 32 files changed, 128 insertions(+) diff --git a/integration-tests/call-runtime/Cargo.toml b/integration-tests/call-runtime/Cargo.toml index 72aa67835a9..a6e2ac16a3a 100644 --- a/integration-tests/call-runtime/Cargo.toml +++ b/integration-tests/call-runtime/Cargo.toml @@ -41,3 +41,7 @@ e2e-tests = [] # Assumes that the node used in E2E testing allows using the `call-runtime` API, including triggering # `Balances::transfer` extrinsic. permissive-node = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/contract-terminate/Cargo.toml b/integration-tests/contract-terminate/Cargo.toml index d2834eb3c92..41b32d1a122 100644 --- a/integration-tests/contract-terminate/Cargo.toml +++ b/integration-tests/contract-terminate/Cargo.toml @@ -28,3 +28,7 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/contract-transfer/Cargo.toml b/integration-tests/contract-transfer/Cargo.toml index 1b54492d75b..0b0dd1e539d 100644 --- a/integration-tests/contract-transfer/Cargo.toml +++ b/integration-tests/contract-transfer/Cargo.toml @@ -28,3 +28,7 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/custom-environment/Cargo.toml b/integration-tests/custom-environment/Cargo.toml index 514d7ada7b4..b393fc2b3a6 100644 --- a/integration-tests/custom-environment/Cargo.toml +++ b/integration-tests/custom-environment/Cargo.toml @@ -29,3 +29,7 @@ e2e-tests = [] # Assumes that the node used in E2E testing allows for at least 6 event topics. permissive-node = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/custom_allocator/Cargo.toml b/integration-tests/custom_allocator/Cargo.toml index b77054071e5..6653c6f1e97 100755 --- a/integration-tests/custom_allocator/Cargo.toml +++ b/integration-tests/custom_allocator/Cargo.toml @@ -31,3 +31,7 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/delegator/Cargo.toml b/integration-tests/delegator/Cargo.toml index e1856d39a3f..409b6738812 100644 --- a/integration-tests/delegator/Cargo.toml +++ b/integration-tests/delegator/Cargo.toml @@ -43,3 +43,7 @@ members = [ "adder", "subber", ] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/delegator/accumulator/Cargo.toml b/integration-tests/delegator/accumulator/Cargo.toml index f460417f813..b443751bd70 100644 --- a/integration-tests/delegator/accumulator/Cargo.toml +++ b/integration-tests/delegator/accumulator/Cargo.toml @@ -27,3 +27,7 @@ std = [ "scale-info/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/delegator/adder/Cargo.toml b/integration-tests/delegator/adder/Cargo.toml index 2512c752b20..f32aef7662f 100644 --- a/integration-tests/delegator/adder/Cargo.toml +++ b/integration-tests/delegator/adder/Cargo.toml @@ -32,3 +32,7 @@ std = [ "accumulator/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/delegator/subber/Cargo.toml b/integration-tests/delegator/subber/Cargo.toml index 475e0691122..8fb4d28d453 100644 --- a/integration-tests/delegator/subber/Cargo.toml +++ b/integration-tests/delegator/subber/Cargo.toml @@ -32,3 +32,7 @@ std = [ "accumulator/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/dns/Cargo.toml b/integration-tests/dns/Cargo.toml index 9eb3733ec81..19c7923495c 100644 --- a/integration-tests/dns/Cargo.toml +++ b/integration-tests/dns/Cargo.toml @@ -24,3 +24,7 @@ std = [ "scale-info/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/erc1155/Cargo.toml b/integration-tests/erc1155/Cargo.toml index 2e52ef6642c..f78900dffde 100644 --- a/integration-tests/erc1155/Cargo.toml +++ b/integration-tests/erc1155/Cargo.toml @@ -24,3 +24,7 @@ std = [ "scale-info/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/erc20/Cargo.toml b/integration-tests/erc20/Cargo.toml index 2389805c87b..05626a4411f 100644 --- a/integration-tests/erc20/Cargo.toml +++ b/integration-tests/erc20/Cargo.toml @@ -28,3 +28,7 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/erc721/Cargo.toml b/integration-tests/erc721/Cargo.toml index f8d1cca5f3f..595ef8a3217 100644 --- a/integration-tests/erc721/Cargo.toml +++ b/integration-tests/erc721/Cargo.toml @@ -24,3 +24,7 @@ std = [ "scale-info/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/flipper/Cargo.toml b/integration-tests/flipper/Cargo.toml index 324f87ddaec..3f25b6b1eeb 100644 --- a/integration-tests/flipper/Cargo.toml +++ b/integration-tests/flipper/Cargo.toml @@ -28,3 +28,7 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/incrementer/Cargo.toml b/integration-tests/incrementer/Cargo.toml index 173eb53c804..68d6219a711 100644 --- a/integration-tests/incrementer/Cargo.toml +++ b/integration-tests/incrementer/Cargo.toml @@ -24,3 +24,7 @@ std = [ "scale-info/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/lang-err-integration-tests/call-builder/Cargo.toml b/integration-tests/lang-err-integration-tests/call-builder/Cargo.toml index 008615d68df..11f5218bf80 100755 --- a/integration-tests/lang-err-integration-tests/call-builder/Cargo.toml +++ b/integration-tests/lang-err-integration-tests/call-builder/Cargo.toml @@ -37,3 +37,7 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/lang-err-integration-tests/constructors-return-value/Cargo.toml b/integration-tests/lang-err-integration-tests/constructors-return-value/Cargo.toml index 6d4dfa6bce0..674984eaea0 100644 --- a/integration-tests/lang-err-integration-tests/constructors-return-value/Cargo.toml +++ b/integration-tests/lang-err-integration-tests/constructors-return-value/Cargo.toml @@ -33,3 +33,7 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/lang-err-integration-tests/contract-ref/Cargo.toml b/integration-tests/lang-err-integration-tests/contract-ref/Cargo.toml index 8801797b2f2..6767acae059 100755 --- a/integration-tests/lang-err-integration-tests/contract-ref/Cargo.toml +++ b/integration-tests/lang-err-integration-tests/contract-ref/Cargo.toml @@ -34,3 +34,7 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/lang-err-integration-tests/integration-flipper/Cargo.toml b/integration-tests/lang-err-integration-tests/integration-flipper/Cargo.toml index fa037e62d55..25ddc7e7245 100644 --- a/integration-tests/lang-err-integration-tests/integration-flipper/Cargo.toml +++ b/integration-tests/lang-err-integration-tests/integration-flipper/Cargo.toml @@ -33,3 +33,7 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/mapping_integration_tests/Cargo.toml b/integration-tests/mapping_integration_tests/Cargo.toml index ce9d51ce890..e780ed3fca8 100755 --- a/integration-tests/mapping_integration_tests/Cargo.toml +++ b/integration-tests/mapping_integration_tests/Cargo.toml @@ -31,3 +31,7 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/mother/Cargo.toml b/integration-tests/mother/Cargo.toml index 4e322fcc514..b49f17d86ff 100755 --- a/integration-tests/mother/Cargo.toml +++ b/integration-tests/mother/Cargo.toml @@ -31,3 +31,7 @@ std = [ "scale-info/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/multisig/Cargo.toml b/integration-tests/multisig/Cargo.toml index 76eeb76a866..44cb3393a95 100755 --- a/integration-tests/multisig/Cargo.toml +++ b/integration-tests/multisig/Cargo.toml @@ -24,3 +24,7 @@ std = [ "scale-info/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/payment-channel/Cargo.toml b/integration-tests/payment-channel/Cargo.toml index ccfc677d215..25ff1043fd1 100755 --- a/integration-tests/payment-channel/Cargo.toml +++ b/integration-tests/payment-channel/Cargo.toml @@ -29,3 +29,7 @@ std = [ ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/psp22-extension/Cargo.toml b/integration-tests/psp22-extension/Cargo.toml index ec09dbad0f2..4bdbdfdc307 100755 --- a/integration-tests/psp22-extension/Cargo.toml +++ b/integration-tests/psp22-extension/Cargo.toml @@ -24,3 +24,7 @@ std = [ "scale-info/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/rand-extension/Cargo.toml b/integration-tests/rand-extension/Cargo.toml index 1007ad2b03d..6958661188e 100755 --- a/integration-tests/rand-extension/Cargo.toml +++ b/integration-tests/rand-extension/Cargo.toml @@ -24,3 +24,7 @@ std = [ "scale-info/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/trait-erc20/Cargo.toml b/integration-tests/trait-erc20/Cargo.toml index b19515e7a49..00acaa0eac4 100644 --- a/integration-tests/trait-erc20/Cargo.toml +++ b/integration-tests/trait-erc20/Cargo.toml @@ -24,3 +24,7 @@ std = [ "scale-info/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/trait-flipper/Cargo.toml b/integration-tests/trait-flipper/Cargo.toml index 49d6a4265c0..bab23837980 100644 --- a/integration-tests/trait-flipper/Cargo.toml +++ b/integration-tests/trait-flipper/Cargo.toml @@ -24,3 +24,7 @@ std = [ "scale-info/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/trait-incrementer/Cargo.toml b/integration-tests/trait-incrementer/Cargo.toml index 5f308627e56..08f2942da36 100644 --- a/integration-tests/trait-incrementer/Cargo.toml +++ b/integration-tests/trait-incrementer/Cargo.toml @@ -26,3 +26,7 @@ std = [ "traits/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/trait-incrementer/traits/Cargo.toml b/integration-tests/trait-incrementer/traits/Cargo.toml index cd0f8d74311..a70c628436d 100644 --- a/integration-tests/trait-incrementer/traits/Cargo.toml +++ b/integration-tests/trait-incrementer/traits/Cargo.toml @@ -24,3 +24,7 @@ std = [ "scale-info/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/upgradeable-contracts/forward-calls/Cargo.toml b/integration-tests/upgradeable-contracts/forward-calls/Cargo.toml index 4173183631d..fdae3300c42 100644 --- a/integration-tests/upgradeable-contracts/forward-calls/Cargo.toml +++ b/integration-tests/upgradeable-contracts/forward-calls/Cargo.toml @@ -24,3 +24,7 @@ std = [ "scale-info/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/upgradeable-contracts/set-code-hash/Cargo.toml b/integration-tests/upgradeable-contracts/set-code-hash/Cargo.toml index 27b102b19b7..31b99af94d4 100644 --- a/integration-tests/upgradeable-contracts/set-code-hash/Cargo.toml +++ b/integration-tests/upgradeable-contracts/set-code-hash/Cargo.toml @@ -28,3 +28,7 @@ std = [ ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true diff --git a/integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml b/integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml index 0667cb79c30..eeeccfdd58d 100644 --- a/integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml +++ b/integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml @@ -26,3 +26,7 @@ std = [ "scale-info/std", ] ink-as-dependency = [] + +[profile.release] +opt-level = 's' +lto = true From 75ac5f433f8f40566ebd3ac89896fa8e782a7422 Mon Sep 17 00:00:00 2001 From: Alexander Gryaznov Date: Wed, 1 Mar 2023 16:16:44 +0200 Subject: [PATCH 4/5] tweak options, iteration 2 --- integration-tests/dns/Cargo.toml | 2 +- integration-tests/erc1155/Cargo.toml | 2 +- integration-tests/erc20/Cargo.toml | 2 +- integration-tests/erc721/Cargo.toml | 2 +- integration-tests/multisig/Cargo.toml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/integration-tests/dns/Cargo.toml b/integration-tests/dns/Cargo.toml index 19c7923495c..87f6d59c0ac 100644 --- a/integration-tests/dns/Cargo.toml +++ b/integration-tests/dns/Cargo.toml @@ -26,5 +26,5 @@ std = [ ink-as-dependency = [] [profile.release] -opt-level = 's' +opt-level = 'z' lto = true diff --git a/integration-tests/erc1155/Cargo.toml b/integration-tests/erc1155/Cargo.toml index f78900dffde..a3c26c38029 100644 --- a/integration-tests/erc1155/Cargo.toml +++ b/integration-tests/erc1155/Cargo.toml @@ -26,5 +26,5 @@ std = [ ink-as-dependency = [] [profile.release] -opt-level = 's' +opt-level = 'z' lto = true diff --git a/integration-tests/erc20/Cargo.toml b/integration-tests/erc20/Cargo.toml index 05626a4411f..798dffa1700 100644 --- a/integration-tests/erc20/Cargo.toml +++ b/integration-tests/erc20/Cargo.toml @@ -30,5 +30,5 @@ ink-as-dependency = [] e2e-tests = [] [profile.release] -opt-level = 's' +opt-level = 'z' lto = true diff --git a/integration-tests/erc721/Cargo.toml b/integration-tests/erc721/Cargo.toml index 595ef8a3217..f940c4dafc7 100644 --- a/integration-tests/erc721/Cargo.toml +++ b/integration-tests/erc721/Cargo.toml @@ -26,5 +26,5 @@ std = [ ink-as-dependency = [] [profile.release] -opt-level = 's' +opt-level = 'z' lto = true diff --git a/integration-tests/multisig/Cargo.toml b/integration-tests/multisig/Cargo.toml index 44cb3393a95..9bd9e249429 100755 --- a/integration-tests/multisig/Cargo.toml +++ b/integration-tests/multisig/Cargo.toml @@ -26,5 +26,5 @@ std = [ ink-as-dependency = [] [profile.release] -opt-level = 's' +opt-level = 'z' lto = true From ca802d39ba4c34e017e13650d7463df4fd5d5bbd Mon Sep 17 00:00:00 2001 From: Alexander Gryaznov Date: Fri, 3 Mar 2023 16:06:20 +0200 Subject: [PATCH 5/5] Revert "tweak optimization options in profiles" This reverts commit 33d0279ffef43b6b0de6e2bf371e9f465ba7f1b0. --- integration-tests/call-runtime/Cargo.toml | 4 ---- integration-tests/contract-terminate/Cargo.toml | 4 ---- integration-tests/contract-transfer/Cargo.toml | 4 ---- integration-tests/custom-environment/Cargo.toml | 4 ---- integration-tests/custom_allocator/Cargo.toml | 4 ---- integration-tests/delegator/Cargo.toml | 4 ---- integration-tests/delegator/accumulator/Cargo.toml | 4 ---- integration-tests/delegator/adder/Cargo.toml | 4 ---- integration-tests/delegator/subber/Cargo.toml | 4 ---- integration-tests/dns/Cargo.toml | 4 ---- integration-tests/erc1155/Cargo.toml | 4 ---- integration-tests/erc20/Cargo.toml | 4 ---- integration-tests/erc721/Cargo.toml | 4 ---- integration-tests/flipper/Cargo.toml | 4 ---- integration-tests/incrementer/Cargo.toml | 4 ---- .../lang-err-integration-tests/call-builder/Cargo.toml | 4 ---- .../constructors-return-value/Cargo.toml | 4 ---- .../lang-err-integration-tests/contract-ref/Cargo.toml | 4 ---- .../lang-err-integration-tests/integration-flipper/Cargo.toml | 4 ---- integration-tests/mapping_integration_tests/Cargo.toml | 4 ---- integration-tests/mother/Cargo.toml | 4 ---- integration-tests/multisig/Cargo.toml | 4 ---- integration-tests/payment-channel/Cargo.toml | 4 ---- integration-tests/psp22-extension/Cargo.toml | 4 ---- integration-tests/rand-extension/Cargo.toml | 4 ---- integration-tests/trait-erc20/Cargo.toml | 4 ---- integration-tests/trait-flipper/Cargo.toml | 4 ---- integration-tests/trait-incrementer/Cargo.toml | 4 ---- integration-tests/trait-incrementer/traits/Cargo.toml | 4 ---- .../upgradeable-contracts/forward-calls/Cargo.toml | 4 ---- .../upgradeable-contracts/set-code-hash/Cargo.toml | 4 ---- .../set-code-hash/updated-incrementer/Cargo.toml | 4 ---- 32 files changed, 128 deletions(-) diff --git a/integration-tests/call-runtime/Cargo.toml b/integration-tests/call-runtime/Cargo.toml index a6e2ac16a3a..72aa67835a9 100644 --- a/integration-tests/call-runtime/Cargo.toml +++ b/integration-tests/call-runtime/Cargo.toml @@ -41,7 +41,3 @@ e2e-tests = [] # Assumes that the node used in E2E testing allows using the `call-runtime` API, including triggering # `Balances::transfer` extrinsic. permissive-node = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/contract-terminate/Cargo.toml b/integration-tests/contract-terminate/Cargo.toml index 41b32d1a122..d2834eb3c92 100644 --- a/integration-tests/contract-terminate/Cargo.toml +++ b/integration-tests/contract-terminate/Cargo.toml @@ -28,7 +28,3 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/contract-transfer/Cargo.toml b/integration-tests/contract-transfer/Cargo.toml index 0b0dd1e539d..1b54492d75b 100644 --- a/integration-tests/contract-transfer/Cargo.toml +++ b/integration-tests/contract-transfer/Cargo.toml @@ -28,7 +28,3 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/custom-environment/Cargo.toml b/integration-tests/custom-environment/Cargo.toml index b393fc2b3a6..514d7ada7b4 100644 --- a/integration-tests/custom-environment/Cargo.toml +++ b/integration-tests/custom-environment/Cargo.toml @@ -29,7 +29,3 @@ e2e-tests = [] # Assumes that the node used in E2E testing allows for at least 6 event topics. permissive-node = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/custom_allocator/Cargo.toml b/integration-tests/custom_allocator/Cargo.toml index 6653c6f1e97..b77054071e5 100755 --- a/integration-tests/custom_allocator/Cargo.toml +++ b/integration-tests/custom_allocator/Cargo.toml @@ -31,7 +31,3 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/delegator/Cargo.toml b/integration-tests/delegator/Cargo.toml index 409b6738812..e1856d39a3f 100644 --- a/integration-tests/delegator/Cargo.toml +++ b/integration-tests/delegator/Cargo.toml @@ -43,7 +43,3 @@ members = [ "adder", "subber", ] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/delegator/accumulator/Cargo.toml b/integration-tests/delegator/accumulator/Cargo.toml index b443751bd70..f460417f813 100644 --- a/integration-tests/delegator/accumulator/Cargo.toml +++ b/integration-tests/delegator/accumulator/Cargo.toml @@ -27,7 +27,3 @@ std = [ "scale-info/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/delegator/adder/Cargo.toml b/integration-tests/delegator/adder/Cargo.toml index f32aef7662f..2512c752b20 100644 --- a/integration-tests/delegator/adder/Cargo.toml +++ b/integration-tests/delegator/adder/Cargo.toml @@ -32,7 +32,3 @@ std = [ "accumulator/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/delegator/subber/Cargo.toml b/integration-tests/delegator/subber/Cargo.toml index 8fb4d28d453..475e0691122 100644 --- a/integration-tests/delegator/subber/Cargo.toml +++ b/integration-tests/delegator/subber/Cargo.toml @@ -32,7 +32,3 @@ std = [ "accumulator/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/dns/Cargo.toml b/integration-tests/dns/Cargo.toml index 87f6d59c0ac..9eb3733ec81 100644 --- a/integration-tests/dns/Cargo.toml +++ b/integration-tests/dns/Cargo.toml @@ -24,7 +24,3 @@ std = [ "scale-info/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 'z' -lto = true diff --git a/integration-tests/erc1155/Cargo.toml b/integration-tests/erc1155/Cargo.toml index a3c26c38029..2e52ef6642c 100644 --- a/integration-tests/erc1155/Cargo.toml +++ b/integration-tests/erc1155/Cargo.toml @@ -24,7 +24,3 @@ std = [ "scale-info/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 'z' -lto = true diff --git a/integration-tests/erc20/Cargo.toml b/integration-tests/erc20/Cargo.toml index 798dffa1700..2389805c87b 100644 --- a/integration-tests/erc20/Cargo.toml +++ b/integration-tests/erc20/Cargo.toml @@ -28,7 +28,3 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] - -[profile.release] -opt-level = 'z' -lto = true diff --git a/integration-tests/erc721/Cargo.toml b/integration-tests/erc721/Cargo.toml index f940c4dafc7..f8d1cca5f3f 100644 --- a/integration-tests/erc721/Cargo.toml +++ b/integration-tests/erc721/Cargo.toml @@ -24,7 +24,3 @@ std = [ "scale-info/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 'z' -lto = true diff --git a/integration-tests/flipper/Cargo.toml b/integration-tests/flipper/Cargo.toml index 3f25b6b1eeb..324f87ddaec 100644 --- a/integration-tests/flipper/Cargo.toml +++ b/integration-tests/flipper/Cargo.toml @@ -28,7 +28,3 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/incrementer/Cargo.toml b/integration-tests/incrementer/Cargo.toml index 68d6219a711..173eb53c804 100644 --- a/integration-tests/incrementer/Cargo.toml +++ b/integration-tests/incrementer/Cargo.toml @@ -24,7 +24,3 @@ std = [ "scale-info/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/lang-err-integration-tests/call-builder/Cargo.toml b/integration-tests/lang-err-integration-tests/call-builder/Cargo.toml index 11f5218bf80..008615d68df 100755 --- a/integration-tests/lang-err-integration-tests/call-builder/Cargo.toml +++ b/integration-tests/lang-err-integration-tests/call-builder/Cargo.toml @@ -37,7 +37,3 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/lang-err-integration-tests/constructors-return-value/Cargo.toml b/integration-tests/lang-err-integration-tests/constructors-return-value/Cargo.toml index 674984eaea0..6d4dfa6bce0 100644 --- a/integration-tests/lang-err-integration-tests/constructors-return-value/Cargo.toml +++ b/integration-tests/lang-err-integration-tests/constructors-return-value/Cargo.toml @@ -33,7 +33,3 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/lang-err-integration-tests/contract-ref/Cargo.toml b/integration-tests/lang-err-integration-tests/contract-ref/Cargo.toml index 6767acae059..8801797b2f2 100755 --- a/integration-tests/lang-err-integration-tests/contract-ref/Cargo.toml +++ b/integration-tests/lang-err-integration-tests/contract-ref/Cargo.toml @@ -34,7 +34,3 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/lang-err-integration-tests/integration-flipper/Cargo.toml b/integration-tests/lang-err-integration-tests/integration-flipper/Cargo.toml index 25ddc7e7245..fa037e62d55 100644 --- a/integration-tests/lang-err-integration-tests/integration-flipper/Cargo.toml +++ b/integration-tests/lang-err-integration-tests/integration-flipper/Cargo.toml @@ -33,7 +33,3 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/mapping_integration_tests/Cargo.toml b/integration-tests/mapping_integration_tests/Cargo.toml index e780ed3fca8..ce9d51ce890 100755 --- a/integration-tests/mapping_integration_tests/Cargo.toml +++ b/integration-tests/mapping_integration_tests/Cargo.toml @@ -31,7 +31,3 @@ std = [ ] ink-as-dependency = [] e2e-tests = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/mother/Cargo.toml b/integration-tests/mother/Cargo.toml index b49f17d86ff..4e322fcc514 100755 --- a/integration-tests/mother/Cargo.toml +++ b/integration-tests/mother/Cargo.toml @@ -31,7 +31,3 @@ std = [ "scale-info/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/multisig/Cargo.toml b/integration-tests/multisig/Cargo.toml index 9bd9e249429..76eeb76a866 100755 --- a/integration-tests/multisig/Cargo.toml +++ b/integration-tests/multisig/Cargo.toml @@ -24,7 +24,3 @@ std = [ "scale-info/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 'z' -lto = true diff --git a/integration-tests/payment-channel/Cargo.toml b/integration-tests/payment-channel/Cargo.toml index 25ff1043fd1..ccfc677d215 100755 --- a/integration-tests/payment-channel/Cargo.toml +++ b/integration-tests/payment-channel/Cargo.toml @@ -29,7 +29,3 @@ std = [ ] ink-as-dependency = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/psp22-extension/Cargo.toml b/integration-tests/psp22-extension/Cargo.toml index 4bdbdfdc307..ec09dbad0f2 100755 --- a/integration-tests/psp22-extension/Cargo.toml +++ b/integration-tests/psp22-extension/Cargo.toml @@ -24,7 +24,3 @@ std = [ "scale-info/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/rand-extension/Cargo.toml b/integration-tests/rand-extension/Cargo.toml index 6958661188e..1007ad2b03d 100755 --- a/integration-tests/rand-extension/Cargo.toml +++ b/integration-tests/rand-extension/Cargo.toml @@ -24,7 +24,3 @@ std = [ "scale-info/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/trait-erc20/Cargo.toml b/integration-tests/trait-erc20/Cargo.toml index 00acaa0eac4..b19515e7a49 100644 --- a/integration-tests/trait-erc20/Cargo.toml +++ b/integration-tests/trait-erc20/Cargo.toml @@ -24,7 +24,3 @@ std = [ "scale-info/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/trait-flipper/Cargo.toml b/integration-tests/trait-flipper/Cargo.toml index bab23837980..49d6a4265c0 100644 --- a/integration-tests/trait-flipper/Cargo.toml +++ b/integration-tests/trait-flipper/Cargo.toml @@ -24,7 +24,3 @@ std = [ "scale-info/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/trait-incrementer/Cargo.toml b/integration-tests/trait-incrementer/Cargo.toml index 08f2942da36..5f308627e56 100644 --- a/integration-tests/trait-incrementer/Cargo.toml +++ b/integration-tests/trait-incrementer/Cargo.toml @@ -26,7 +26,3 @@ std = [ "traits/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/trait-incrementer/traits/Cargo.toml b/integration-tests/trait-incrementer/traits/Cargo.toml index a70c628436d..cd0f8d74311 100644 --- a/integration-tests/trait-incrementer/traits/Cargo.toml +++ b/integration-tests/trait-incrementer/traits/Cargo.toml @@ -24,7 +24,3 @@ std = [ "scale-info/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/upgradeable-contracts/forward-calls/Cargo.toml b/integration-tests/upgradeable-contracts/forward-calls/Cargo.toml index fdae3300c42..4173183631d 100644 --- a/integration-tests/upgradeable-contracts/forward-calls/Cargo.toml +++ b/integration-tests/upgradeable-contracts/forward-calls/Cargo.toml @@ -24,7 +24,3 @@ std = [ "scale-info/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/upgradeable-contracts/set-code-hash/Cargo.toml b/integration-tests/upgradeable-contracts/set-code-hash/Cargo.toml index 31b99af94d4..27b102b19b7 100644 --- a/integration-tests/upgradeable-contracts/set-code-hash/Cargo.toml +++ b/integration-tests/upgradeable-contracts/set-code-hash/Cargo.toml @@ -28,7 +28,3 @@ std = [ ink-as-dependency = [] - -[profile.release] -opt-level = 's' -lto = true diff --git a/integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml b/integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml index eeeccfdd58d..0667cb79c30 100644 --- a/integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml +++ b/integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml @@ -26,7 +26,3 @@ std = [ "scale-info/std", ] ink-as-dependency = [] - -[profile.release] -opt-level = 's' -lto = true