diff --git a/chain/vm/src/tx_execution/system_sc/system_sc_unimplemented.rs b/chain/vm/src/tx_execution/system_sc/system_sc_unimplemented.rs index cf93be7727..a324f34900 100644 --- a/chain/vm/src/tx_execution/system_sc/system_sc_unimplemented.rs +++ b/chain/vm/src/tx_execution/system_sc/system_sc_unimplemented.rs @@ -3,8 +3,8 @@ use crate::tx_mock::{BlockchainUpdate, TxCache, TxInput, TxResult}; /// Every unimplemented fn will be implemented and moved to its corresponding file. +/// /// This file will be deleted. - pub fn register_meta_esdt(tx_input: TxInput, tx_cache: TxCache) -> (TxResult, BlockchainUpdate) { unimplemented!() } diff --git a/contracts/examples/crypto-kitties/common/random/src/lib.rs b/contracts/examples/crypto-kitties/common/random/src/lib.rs index 46ddd076d6..1cfb5e3fa2 100644 --- a/contracts/examples/crypto-kitties/common/random/src/lib.rs +++ b/contracts/examples/crypto-kitties/common/random/src/lib.rs @@ -24,6 +24,7 @@ pub trait Randomizeable { impl Random { /// block random seed + salt creates a stronger randomness source + #[allow(static_mut_refs)] pub fn new( seed: ManagedByteArray, salt: ManagedByteArray, diff --git a/data/codec/src/impl_for_types/impl_phantom.rs b/data/codec/src/impl_for_types/impl_phantom.rs index 6036152f02..60087753b6 100644 --- a/data/codec/src/impl_for_types/impl_phantom.rs +++ b/data/codec/src/impl_for_types/impl_phantom.rs @@ -8,7 +8,6 @@ use crate::{ /// Empty structure with an empty bytes representation. Equivalent to `false`, `0` or `[u8; 0]`, but more explicit. /// /// Note: the unit type `()` would have naturally fit this role, but we decided to make the unit type multi-value only. - impl TopEncode for PhantomData { #[inline] fn top_encode_or_handle_err(&self, output: O, _h: H) -> Result<(), H::HandledErr> diff --git a/data/codec/src/single/nested_de_input_slice.rs b/data/codec/src/single/nested_de_input_slice.rs index ce399a8de9..b0dd0eed51 100644 --- a/data/codec/src/single/nested_de_input_slice.rs +++ b/data/codec/src/single/nested_de_input_slice.rs @@ -1,7 +1,7 @@ use crate::{DecodeError, DecodeErrorHandler, NestedDecode, NestedDecodeInput}; /// A nested decode buffer implementation on referenced data. -impl<'a> NestedDecodeInput for &'a [u8] { +impl NestedDecodeInput for &[u8] { fn remaining_len(&self) -> usize { self.len() } diff --git a/data/codec/src/single/top_en_output.rs b/data/codec/src/single/top_en_output.rs index 4f955ca2f2..b2d2618d39 100644 --- a/data/codec/src/single/top_en_output.rs +++ b/data/codec/src/single/top_en_output.rs @@ -5,7 +5,6 @@ use crate::{ use alloc::vec::Vec; /// Specifies objects that can receive the result of a TopEncode computation. - /// in principle from NestedEncode performed on nested items. /// /// All methods consume the object, so they can only be called once. diff --git a/framework/base/src/lib.rs b/framework/base/src/lib.rs index 9f6680af7c..f6c765e67b 100644 --- a/framework/base/src/lib.rs +++ b/framework/base/src/lib.rs @@ -1,5 +1,6 @@ #![no_std] #![allow(deprecated)] +#![allow(clippy::needless_lifetimes)] // TODO: fix them all! pub use multiversx_sc_derive::{self as derive, contract, module, proxy}; diff --git a/framework/base/src/storage/mappers/map_mapper.rs b/framework/base/src/storage/mappers/map_mapper.rs index 0da042334a..9e90917985 100644 --- a/framework/base/src/storage/mappers/map_mapper.rs +++ b/framework/base/src/storage/mappers/map_mapper.rs @@ -438,7 +438,7 @@ where } } -impl<'a, SA, A, K, V> VacantEntry<'a, SA, A, K, V> +impl VacantEntry<'_, SA, A, K, V> where SA: StorageMapperApi, A: StorageAddress, diff --git a/framework/base/src/types/managed/basic/managed_buffer.rs b/framework/base/src/types/managed/basic/managed_buffer.rs index cafa32a4d2..d3c0c28e38 100644 --- a/framework/base/src/types/managed/basic/managed_buffer.rs +++ b/framework/base/src/types/managed/basic/managed_buffer.rs @@ -94,7 +94,6 @@ impl ManagedBuffer { /// ## Safety /// /// The reference points to a shared value. Make sure the handle is not leaked. - pub unsafe fn temp_const_ref( raw_handle: RawHandle, ) -> ManagedRef<'static, M, ManagedBuffer> { diff --git a/framework/base/src/types/managed/wrapped/managed_ref.rs b/framework/base/src/types/managed/wrapped/managed_ref.rs index ef0e20fb9f..f618063b3c 100644 --- a/framework/base/src/types/managed/wrapped/managed_ref.rs +++ b/framework/base/src/types/managed/wrapped/managed_ref.rs @@ -143,7 +143,7 @@ where } } -impl<'a, M, T> NestedEncode for ManagedRef<'a, M, T> +impl NestedEncode for ManagedRef<'_, M, T> where M: ManagedTypeApi, T: ManagedType + NestedEncode, @@ -158,7 +158,7 @@ where } } -impl<'a, M, T> core::fmt::Debug for ManagedRef<'a, M, T> +impl core::fmt::Debug for ManagedRef<'_, M, T> where M: ManagedTypeApi, T: ManagedType + core::fmt::Debug, diff --git a/framework/base/src/types/managed/wrapped/managed_ref_mut.rs b/framework/base/src/types/managed/wrapped/managed_ref_mut.rs index 81315b89b2..868ef89e78 100644 --- a/framework/base/src/types/managed/wrapped/managed_ref_mut.rs +++ b/framework/base/src/types/managed/wrapped/managed_ref_mut.rs @@ -20,12 +20,12 @@ where pub(super) handle: T::OwnHandle, } -impl<'a, M, T> ManagedRefMut<'a, M, T> +impl ManagedRefMut<'_, M, T> where M: ManagedTypeApi, T: ManagedType, { - pub fn new(value: &'a mut T) -> Self { + pub fn new(value: &mut T) -> Self { Self { _phantom_m: PhantomData, _phantom_t: PhantomData, @@ -44,7 +44,7 @@ where } } -impl<'a, M, T> ManagedRefMut<'a, M, T> +impl ManagedRefMut<'_, M, T> where M: ManagedTypeApi, T: ManagedType + Clone, @@ -55,7 +55,7 @@ where } } -impl<'a, M, T> Clone for ManagedRefMut<'a, M, T> +impl Clone for ManagedRefMut<'_, M, T> where M: ManagedTypeApi, T: ManagedType, @@ -70,7 +70,7 @@ where } } -impl<'a, M, T> Deref for ManagedRefMut<'a, M, T> +impl Deref for ManagedRefMut<'_, M, T> where M: ManagedTypeApi, T: ManagedType, @@ -83,7 +83,7 @@ where } } -impl<'a, M, T> DerefMut for ManagedRefMut<'a, M, T> +impl DerefMut for ManagedRefMut<'_, M, T> where M: ManagedTypeApi, T: ManagedType, @@ -93,7 +93,7 @@ where } } -impl<'a, M, T> Borrow for ManagedRefMut<'a, M, T> +impl Borrow for ManagedRefMut<'_, M, T> where M: ManagedTypeApi, T: ManagedType, diff --git a/framework/meta/src/cmd/code_report/render_code_report.rs b/framework/meta/src/cmd/code_report/render_code_report.rs index e6edcfae8e..f72a05abdf 100644 --- a/framework/meta/src/cmd/code_report/render_code_report.rs +++ b/framework/meta/src/cmd/code_report/render_code_report.rs @@ -61,14 +61,14 @@ impl<'a> CodeReportRender<'a> { fn write_report_for_contract( &mut self, - path: &String, - size: &String, - has_allocator: &String, - has_panic: &String, + path: &str, + size: &str, + has_allocator: &str, + has_panic: &str, ) { self.writeln(format!( "| {} | {} | {} | {} |", - path.split('/').last().unwrap_or_else(|| path), + path.split('/').last().unwrap_or(path), size, has_allocator, has_panic diff --git a/framework/meta/src/cmd/template/template_source.rs b/framework/meta/src/cmd/template/template_source.rs index ea4140cd31..c8f83ac87e 100644 --- a/framework/meta/src/cmd/template/template_source.rs +++ b/framework/meta/src/cmd/template/template_source.rs @@ -16,7 +16,7 @@ pub struct TemplateSource<'a> { pub metadata: TemplateMetadata, } -impl<'a> TemplateSource<'a> { +impl TemplateSource<'_> { pub fn copy_template(&self, target_path: impl AsRef, args_tag: FrameworkVersion) { whitelisted_deep_copy( &self.source_path, diff --git a/framework/scenario/src/facade/expr/file_path.rs b/framework/scenario/src/facade/expr/file_path.rs index 8d779a6fd1..0c05165fb2 100644 --- a/framework/scenario/src/facade/expr/file_path.rs +++ b/framework/scenario/src/facade/expr/file_path.rs @@ -12,7 +12,7 @@ const FILE_PREFIX: &str = "file:"; #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct FilePath<'a>(pub &'a str); -impl<'a> FilePath<'a> { +impl FilePath<'_> { pub fn eval_to_expr(&self) -> String { format!("{FILE_PREFIX}{}", self.0) } @@ -36,9 +36,9 @@ where } } -impl<'a, Env> TxCodeValue for FilePath<'a> where Env: ScenarioTxEnv {} +impl TxCodeValue for FilePath<'_> where Env: ScenarioTxEnv {} -impl<'a> RegisterCodeSource for FilePath<'a> { +impl RegisterCodeSource for FilePath<'_> { fn into_code(self, env_data: ScenarioTxEnvData) -> Vec { self.resolve_contents(&env_data.interpreter_context()) } diff --git a/framework/scenario/src/lib.rs b/framework/scenario/src/lib.rs index cfac7eaa50..46238e2ab9 100644 --- a/framework/scenario/src/lib.rs +++ b/framework/scenario/src/lib.rs @@ -1,4 +1,5 @@ #![allow(clippy::type_complexity)] +#![allow(clippy::needless_lifetimes)] // TODO: fix them all! pub mod api; pub mod bech32; diff --git a/framework/snippets/src/interactor/interactor_tx/interactor_exec_env.rs b/framework/snippets/src/interactor/interactor_tx/interactor_exec_env.rs index c7987d28e6..ba01813f9c 100644 --- a/framework/snippets/src/interactor/interactor_tx/interactor_exec_env.rs +++ b/framework/snippets/src/interactor/interactor_tx/interactor_exec_env.rs @@ -30,7 +30,7 @@ where pub data: ScenarioTxEnvData, } -impl<'w, GatewayProxy> TxEnv for InteractorEnvExec<'w, GatewayProxy> +impl TxEnv for InteractorEnvExec<'_, GatewayProxy> where GatewayProxy: GatewayAsyncService, { @@ -51,7 +51,7 @@ where } } -impl<'w, GatewayProxy> ScenarioTxEnv for InteractorEnvExec<'w, GatewayProxy> +impl ScenarioTxEnv for InteractorEnvExec<'_, GatewayProxy> where GatewayProxy: GatewayAsyncService, { @@ -60,7 +60,7 @@ where } } -impl<'w, GatewayProxy> TxEnvWithTxHash for InteractorEnvExec<'w, GatewayProxy> +impl TxEnvWithTxHash for InteractorEnvExec<'_, GatewayProxy> where GatewayProxy: GatewayAsyncService, { diff --git a/framework/snippets/src/interactor/interactor_tx/interactor_exec_transf.rs b/framework/snippets/src/interactor/interactor_tx/interactor_exec_transf.rs index bb7559ba93..1dade9dc6b 100644 --- a/framework/snippets/src/interactor/interactor_tx/interactor_exec_transf.rs +++ b/framework/snippets/src/interactor/interactor_tx/interactor_exec_transf.rs @@ -54,7 +54,7 @@ where } } -impl<'w, GatewayProxy> InteractorExecStep<'w, GatewayProxy, TransferStep, ()> +impl InteractorExecStep<'_, GatewayProxy, TransferStep, ()> where GatewayProxy: GatewayAsyncService, { diff --git a/framework/snippets/src/interactor/interactor_tx/interactor_query_env.rs b/framework/snippets/src/interactor/interactor_tx/interactor_query_env.rs index 25d0b5e822..dbd2066a66 100644 --- a/framework/snippets/src/interactor/interactor_tx/interactor_query_env.rs +++ b/framework/snippets/src/interactor/interactor_tx/interactor_query_env.rs @@ -27,7 +27,7 @@ where pub data: ScenarioTxEnvData, } -impl<'w, GatewayProxy> TxEnv for InteractorEnvQuery<'w, GatewayProxy> +impl TxEnv for InteractorEnvQuery<'_, GatewayProxy> where GatewayProxy: GatewayAsyncService, { @@ -48,7 +48,7 @@ where } } -impl<'w, GatewayProxy> ScenarioTxEnv for InteractorEnvQuery<'w, GatewayProxy> +impl ScenarioTxEnv for InteractorEnvQuery<'_, GatewayProxy> where GatewayProxy: GatewayAsyncService, { diff --git a/framework/snippets/src/multi/interactor_step.rs b/framework/snippets/src/multi/interactor_step.rs index 93a93d6a9e..b8df05a9a5 100644 --- a/framework/snippets/src/multi/interactor_step.rs +++ b/framework/snippets/src/multi/interactor_step.rs @@ -13,7 +13,7 @@ pub enum InteractorStepRef<'a> { ScDeploy(&'a mut ScDeployStep), } -impl<'a> InteractorStepRef<'a> { +impl InteractorStepRef<'_> { pub fn to_transaction( &self, interactor: &InteractorBase, diff --git a/framework/wasm-adapter/src/api/unsafe_buffer.rs b/framework/wasm-adapter/src/api/unsafe_buffer.rs index c18034de6b..8794203daa 100644 --- a/framework/wasm-adapter/src/api/unsafe_buffer.rs +++ b/framework/wasm-adapter/src/api/unsafe_buffer.rs @@ -11,10 +11,12 @@ static mut BUFFER_1: [u8; BUFFER_1_SIZE] = [0u8; BUFFER_1_SIZE]; /// The second buffer is for when the first one is busy with something else. static mut BUFFER_2: [u8; BUFFER_2_SIZE] = [0u8; BUFFER_2_SIZE]; +#[allow(static_mut_refs)] pub(crate) unsafe fn buffer_1_ptr() -> *mut u8 { BUFFER_1.as_mut_ptr() } +#[allow(static_mut_refs)] pub(crate) unsafe fn buffer_2_ptr() -> *mut u8 { BUFFER_2.as_mut_ptr() } diff --git a/framework/wasm-adapter/src/wasm_alloc/leaking_allocator.rs b/framework/wasm-adapter/src/wasm_alloc/leaking_allocator.rs index 8a40b0ac68..06e246f0e4 100644 --- a/framework/wasm-adapter/src/wasm_alloc/leaking_allocator.rs +++ b/framework/wasm-adapter/src/wasm_alloc/leaking_allocator.rs @@ -45,7 +45,7 @@ unsafe impl GlobalAlloc for LeakingAllocator { if new_total > *size { // Request enough new space for this allocation, even if we have some space left over from the last one incase they end up non-contiguous. // Round up to a number of pages - let requested_pages = (requested_size + PAGE_SIZE - 1) / PAGE_SIZE; + let requested_pages = requested_size.div_ceil(PAGE_SIZE); let previous_page_count = memory_grow(PageCount(requested_pages)); let previous_size = previous_page_count.size_in_bytes(); diff --git a/sdk/core/src/crypto/public_key.rs b/sdk/core/src/crypto/public_key.rs index 448bf57e9d..6ad8604ecb 100644 --- a/sdk/core/src/crypto/public_key.rs +++ b/sdk/core/src/crypto/public_key.rs @@ -34,7 +34,7 @@ impl PublicKey { } } -impl<'a> From<&'a PrivateKey> for PublicKey { +impl From<&PrivateKey> for PublicKey { fn from(private_key: &PrivateKey) -> PublicKey { let bytes = private_key.to_bytes(); diff --git a/sdk/core/src/gateway/gateway_account.rs b/sdk/core/src/gateway/gateway_account.rs index 76eee4c736..913c55d0eb 100644 --- a/sdk/core/src/gateway/gateway_account.rs +++ b/sdk/core/src/gateway/gateway_account.rs @@ -16,7 +16,7 @@ impl<'a> GetAccountRequest<'a> { } } -impl<'a> GatewayRequest for GetAccountRequest<'a> { +impl GatewayRequest for GetAccountRequest<'_> { type Payload = (); type DecodedJson = AccountResponse; type Result = Account; diff --git a/sdk/core/src/gateway/gateway_account_esdt_roles.rs b/sdk/core/src/gateway/gateway_account_esdt_roles.rs index 421edd81b2..d7b19e8e41 100644 --- a/sdk/core/src/gateway/gateway_account_esdt_roles.rs +++ b/sdk/core/src/gateway/gateway_account_esdt_roles.rs @@ -16,7 +16,7 @@ impl<'a> GetAccountEsdtRolesRequest<'a> { } } -impl<'a> GatewayRequest for GetAccountEsdtRolesRequest<'a> { +impl GatewayRequest for GetAccountEsdtRolesRequest<'_> { type Payload = (); type DecodedJson = EsdtRolesResponse; type Result = HashMap>; diff --git a/sdk/core/src/gateway/gateway_account_esdt_tokens.rs b/sdk/core/src/gateway/gateway_account_esdt_tokens.rs index 72e27e54a9..e2916fe840 100644 --- a/sdk/core/src/gateway/gateway_account_esdt_tokens.rs +++ b/sdk/core/src/gateway/gateway_account_esdt_tokens.rs @@ -16,7 +16,7 @@ impl<'a> GetAccountEsdtTokensRequest<'a> { } } -impl<'a> GatewayRequest for GetAccountEsdtTokensRequest<'a> { +impl GatewayRequest for GetAccountEsdtTokensRequest<'_> { type Payload = (); type DecodedJson = EsdtBalanceResponse; type Result = HashMap; diff --git a/sdk/core/src/gateway/gateway_account_storage.rs b/sdk/core/src/gateway/gateway_account_storage.rs index 6c1bffe55f..011d29d460 100644 --- a/sdk/core/src/gateway/gateway_account_storage.rs +++ b/sdk/core/src/gateway/gateway_account_storage.rs @@ -16,7 +16,7 @@ impl<'a> GetAccountStorageRequest<'a> { } } -impl<'a> GatewayRequest for GetAccountStorageRequest<'a> { +impl GatewayRequest for GetAccountStorageRequest<'_> { type Payload = (); type DecodedJson = AccountStorageResponse; type Result = HashMap; diff --git a/sdk/core/src/gateway/gateway_tx_cost.rs b/sdk/core/src/gateway/gateway_tx_cost.rs index 333b0324c5..3ca8eff823 100644 --- a/sdk/core/src/gateway/gateway_tx_cost.rs +++ b/sdk/core/src/gateway/gateway_tx_cost.rs @@ -8,7 +8,7 @@ use super::{GatewayRequest, GatewayRequestType, COST_TRANSACTION_ENDPOINT}; /// Note: it is a POST request. pub struct GetTxCost<'a>(pub &'a Transaction); -impl<'a> GatewayRequest for GetTxCost<'a> { +impl GatewayRequest for GetTxCost<'_> { type Payload = Transaction; type DecodedJson = ResponseTxCost; type Result = TxCostResponseData; diff --git a/sdk/core/src/gateway/gateway_tx_info.rs b/sdk/core/src/gateway/gateway_tx_info.rs index f4d26e9d44..d9cc12d02b 100644 --- a/sdk/core/src/gateway/gateway_tx_info.rs +++ b/sdk/core/src/gateway/gateway_tx_info.rs @@ -27,7 +27,7 @@ impl<'a> GetTxInfo<'a> { } } -impl<'a> GatewayRequest for GetTxInfo<'a> { +impl GatewayRequest for GetTxInfo<'_> { type Payload = (); type DecodedJson = TransactionInfo; type Result = TransactionOnNetwork; diff --git a/sdk/core/src/gateway/gateway_tx_process_status.rs b/sdk/core/src/gateway/gateway_tx_process_status.rs index d829cb60fe..103bb4e4a6 100644 --- a/sdk/core/src/gateway/gateway_tx_process_status.rs +++ b/sdk/core/src/gateway/gateway_tx_process_status.rs @@ -14,7 +14,7 @@ impl<'a> GetTxProcessStatus<'a> { } } -impl<'a> GatewayRequest for GetTxProcessStatus<'a> { +impl GatewayRequest for GetTxProcessStatus<'_> { type Payload = (); type DecodedJson = TransactionProcessStatus; type Result = (String, String); diff --git a/sdk/core/src/gateway/gateway_tx_send.rs b/sdk/core/src/gateway/gateway_tx_send.rs index a76354df8e..4c3b9d584a 100644 --- a/sdk/core/src/gateway/gateway_tx_send.rs +++ b/sdk/core/src/gateway/gateway_tx_send.rs @@ -6,7 +6,7 @@ use super::{GatewayRequest, GatewayRequestType, SEND_TRANSACTION_ENDPOINT}; /// Sends a single transaction. pub struct SendTxRequest<'a>(pub &'a Transaction); -impl<'a> GatewayRequest for SendTxRequest<'a> { +impl GatewayRequest for SendTxRequest<'_> { type Payload = Transaction; type DecodedJson = SendTransactionResponse; type Result = String; diff --git a/sdk/core/src/gateway/gateway_tx_send_multi.rs b/sdk/core/src/gateway/gateway_tx_send_multi.rs index 472beaf5ba..8be1d1d4c0 100644 --- a/sdk/core/src/gateway/gateway_tx_send_multi.rs +++ b/sdk/core/src/gateway/gateway_tx_send_multi.rs @@ -7,7 +7,7 @@ use super::{GatewayRequest, GatewayRequestType, SEND_MULTIPLE_TRANSACTIONS_ENDPO /// Sends multiple transactions at once. pub struct SendMultiTxRequest<'a>(pub &'a [Transaction]); -impl<'a> GatewayRequest for SendMultiTxRequest<'a> { +impl GatewayRequest for SendMultiTxRequest<'_> { type Payload = [Transaction]; type DecodedJson = SendTransactionsResponse; type Result = Vec; diff --git a/sdk/core/src/gateway/gateway_tx_status.rs b/sdk/core/src/gateway/gateway_tx_status.rs index ac4e37e6b4..12660a2c57 100644 --- a/sdk/core/src/gateway/gateway_tx_status.rs +++ b/sdk/core/src/gateway/gateway_tx_status.rs @@ -14,7 +14,7 @@ impl<'a> GetTxStatus<'a> { } } -impl<'a> GatewayRequest for GetTxStatus<'a> { +impl GatewayRequest for GetTxStatus<'_> { type Payload = (); type DecodedJson = TransactionStatus; type Result = String; diff --git a/sdk/core/src/gateway/gateway_tx_vmquery.rs b/sdk/core/src/gateway/gateway_tx_vmquery.rs index e1523571da..9de88f6d2f 100644 --- a/sdk/core/src/gateway/gateway_tx_vmquery.rs +++ b/sdk/core/src/gateway/gateway_tx_vmquery.rs @@ -6,7 +6,7 @@ use super::{GatewayRequest, GatewayRequestType, VM_VALUES_ENDPOINT}; /// Executes a VM query. pub struct VMQueryRequest<'a>(pub &'a VMQueryInput); -impl<'a> GatewayRequest for VMQueryRequest<'a> { +impl GatewayRequest for VMQueryRequest<'_> { type Payload = VMQueryInput; type DecodedJson = ResponseVmValue; type Result = VmValuesResponseData; diff --git a/sdk/core/src/retrieve_tx_on_network.rs b/sdk/core/src/retrieve_tx_on_network.rs index 3cfcf9fc77..3c60a92fa2 100644 --- a/sdk/core/src/retrieve_tx_on_network.rs +++ b/sdk/core/src/retrieve_tx_on_network.rs @@ -138,7 +138,7 @@ pub fn extract_message_from_string_reason(reason: &str) -> String { return message[0].to_string(); } - return contract_error.last().unwrap_or(&"").split(']').collect(); + contract_error.last().unwrap_or(&"").split(']').collect() } fn create_tx_failed(error_message: &str) -> TransactionOnNetwork { diff --git a/sdk/scenario-format/src/value_interpreter/reconstructor.rs b/sdk/scenario-format/src/value_interpreter/reconstructor.rs index 6efacefba4..e21a298905 100644 --- a/sdk/scenario-format/src/value_interpreter/reconstructor.rs +++ b/sdk/scenario-format/src/value_interpreter/reconstructor.rs @@ -147,7 +147,7 @@ fn can_interpret_as_string(bytes: &[u8]) -> bool { if bytes.is_empty() { return false; } - return !bytes.iter().any(|&b| !(32..=126).contains(&b)); + !bytes.iter().any(|&b| !(32..=126).contains(&b)) } fn code_pretty(bytes: &[u8]) -> String {