diff --git a/proto-build/src/commands/export.rs b/proto-build/src/commands/export.rs index 8d29fae..549ce2c 100644 --- a/proto-build/src/commands/export.rs +++ b/proto-build/src/commands/export.rs @@ -5,11 +5,11 @@ use std::path::Path; pub fn export(submodules_dir: &Path, proto_dir: &Path) { if proto_dir.exists() { - fs::remove_dir_all(&proto_dir).unwrap(); + fs::remove_dir_all(proto_dir).unwrap(); } - run_buf_export(submodules_dir, ARCHWAY_DIR, &proto_dir).unwrap(); - run_buf_export(submodules_dir, COSMOS_SDK_DIR, &proto_dir).unwrap(); - run_buf_export(submodules_dir, IBC_DIR, &proto_dir).unwrap(); - run_buf_export(submodules_dir, WASMD_DIR, &proto_dir).unwrap(); + run_buf_export(submodules_dir, ARCHWAY_DIR, proto_dir).unwrap(); + run_buf_export(submodules_dir, COSMOS_SDK_DIR, proto_dir).unwrap(); + run_buf_export(submodules_dir, IBC_DIR, proto_dir).unwrap(); + run_buf_export(submodules_dir, WASMD_DIR, proto_dir).unwrap(); } diff --git a/proto-build/src/commands/generate.rs b/proto-build/src/commands/generate.rs index e512c83..a3f904f 100644 --- a/proto-build/src/commands/generate.rs +++ b/proto-build/src/commands/generate.rs @@ -6,7 +6,7 @@ pub fn generate(buf_gen_path: &Path, proto_path: &Path, out_dir: &Path) -> crate println!("Generating proto..."); if out_dir.exists() { - fs::remove_dir_all(&out_dir).unwrap(); + fs::remove_dir_all(out_dir).unwrap(); } run_cmd( diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs index dbf152c..930fe64 100644 --- a/proto-build/src/main.rs +++ b/proto-build/src/main.rs @@ -4,7 +4,7 @@ mod parser; mod utils; use std::path::PathBuf; -use std::{io, path::Path, process}; +use std::{io, path::Path}; use crate::commands::apply_patches::apply_patches; use crate::commands::cleanup::cleanup; diff --git a/proto-build/src/parser/utils/common.rs b/proto-build/src/parser/utils/common.rs index c6252cb..923d6f4 100644 --- a/proto-build/src/parser/utils/common.rs +++ b/proto-build/src/parser/utils/common.rs @@ -2,8 +2,8 @@ use proc_macro2::Span; use syn::punctuated::Punctuated; use syn::token::PathSep; use syn::{ - Field, Fields, FieldsNamed, GenericArgument, Ident, Item, ItemStruct, Path, PathArguments, - PathSegment, TraitBound, TraitBoundModifier, Type, TypeParam, TypeParamBound, TypePath, + Fields, FieldsNamed, Ident, Item, ItemStruct, Path, PathArguments, + PathSegment, Type, TypePath, }; pub fn item_as_struct(item: &mut Item) -> Option<&mut ItemStruct> { diff --git a/proto-build/src/utils/patch_file.rs b/proto-build/src/utils/patch_file.rs index 1fbf320..fd38e68 100644 --- a/proto-build/src/utils/patch_file.rs +++ b/proto-build/src/utils/patch_file.rs @@ -3,7 +3,7 @@ use std::path::Path; use std::{fs, io}; pub fn patch_file(path: &Path, replacements: &[(&str, &str)]) -> io::Result<()> { - let mut contents = fs::read_to_string(&path)?; + let mut contents = fs::read_to_string(path)?; for &(regex, replacement) in replacements { contents = Regex::new(regex)