From d18192893d8af4c73780cabba004d3aa20a7941f Mon Sep 17 00:00:00 2001 From: 0xpause Date: Sun, 7 Jul 2024 22:52:09 +0800 Subject: [PATCH] fix fmt --- .../src/jsonrpc_types/module_abi_view.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/crates/rooch-rpc-api/src/jsonrpc_types/module_abi_view.rs b/crates/rooch-rpc-api/src/jsonrpc_types/module_abi_view.rs index a446c3a2bb..96a66ad9c2 100644 --- a/crates/rooch-rpc-api/src/jsonrpc_types/module_abi_view.rs +++ b/crates/rooch-rpc-api/src/jsonrpc_types/module_abi_view.rs @@ -13,11 +13,7 @@ use move_binary_format::{ Visibility, }, }; -use move_core_types::{ - account_address::AccountAddress, - identifier::Identifier, - language_storage::{StructTag, TypeTag}, -}; +use move_core_types::{account_address::AccountAddress, identifier::Identifier}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use std::fmt::{self, Debug}; @@ -84,7 +80,7 @@ impl std::fmt::Display for MoveABITypeView { impl FromStr for MoveABITypeView { type Err = anyhow::Error; - fn from_str(s: &str) -> Result { + fn from_str(_s: &str) -> Result { // TODO unimplemented!("No scenario for deserializing MoveABITypeView") } @@ -141,7 +137,7 @@ impl std::fmt::Display for MoveABIStructTagView { impl FromStr for MoveABIStructTagView { type Err = anyhow::Error; - fn from_str(s: &str) -> Result { + fn from_str(_s: &str) -> Result { // TODO unimplemented!("No scenario for deserializing MoveABIStructTagView") } @@ -180,10 +176,10 @@ fn signature_token_to_abi_type(m: &CompiledModule, token: &SignatureToken) -> Mo MoveABIType::Vector(Box::new(signature_token_to_abi_type(m, t.borrow()))) } SignatureToken::Struct(v) => { - MoveABIType::Struct(Box::new(signature_token_to_abi_struct_tag(&m, v, &[]))) + MoveABIType::Struct(Box::new(signature_token_to_abi_struct_tag(m, v, &[]))) } SignatureToken::StructInstantiation(shi, type_params) => MoveABIType::Struct(Box::new( - signature_token_to_abi_struct_tag(&m, shi, type_params), + signature_token_to_abi_struct_tag(m, shi, type_params), )), SignatureToken::TypeParameter(i) => MoveABIType::GenericTypeParam { index: *i }, SignatureToken::Reference(t) => MoveABIType::Reference { @@ -369,7 +365,7 @@ impl From for ModuleABIView { friends: m .immediate_friends() .into_iter() - .map(|m| ModuleIdView::from(m)) + .map(ModuleIdView::from) .collect(), functions: m .function_defs