From a55782841992fcbec88e48c72bdcd1bfc3a92aac Mon Sep 17 00:00:00 2001 From: Andrea Gunderson Date: Fri, 21 Jul 2023 12:26:11 -0500 Subject: [PATCH 1/3] Remove needless borrow errors Signed-off-by: Andrea Gunderson --- sdks/rust/build.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdks/rust/build.rs b/sdks/rust/build.rs index dfb3d61c..cf2c9ab5 100644 --- a/sdks/rust/build.rs +++ b/sdks/rust/build.rs @@ -57,14 +57,14 @@ fn main() { .expect("Unable to write mod file"); protoc_rust::Codegen::new() - .out_dir(&dest_path.to_str().expect("Invalid proto destination path")) + .out_dir(dest_path.to_str().expect("Invalid proto destination path")) .inputs( &proto_src_files .iter() .map(|a| a.as_ref()) .collect::>(), ) - .includes(&["src", "protos"]) + .includes(["src", "protos"]) .customize(Customize::default()) .run() .expect("unable to run protoc"); From 9a121fbaae80fe251d8aff2f6aaf7e117d0a0bf1 Mon Sep 17 00:00:00 2001 From: Andrea Gunderson Date: Fri, 21 Jul 2023 12:28:22 -0500 Subject: [PATCH 2/3] Fix clippy error clippy::default_constructed_unit_structs This error was introduced in Rust 1.71.0 Signed-off-by: Andrea Gunderson --- tp/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tp/src/main.rs b/tp/src/main.rs index dc1cd38c..5438a0ae 100644 --- a/tp/src/main.rs +++ b/tp/src/main.rs @@ -65,11 +65,11 @@ fn main() { if matches.is_present("admin_allow_all") { warn!("Starting Sabre transaction processor without admin key verifcation"); SabreHandler::new(SabreTransactionHandler::new(Box::new( - admin::AllowAllAdminPermission::default(), + admin::AllowAllAdminPermission, ))) } else { SabreHandler::new(SabreTransactionHandler::new(Box::new( - admin::SettingsAdminPermission::default(), + admin::SettingsAdminPermission, ))) } }; From e0853ee5f7232a4a8d3e15d09e4550893985fcd7 Mon Sep 17 00:00:00 2001 From: Andrea Gunderson Date: Fri, 29 Sep 2023 08:05:04 -0500 Subject: [PATCH 3/3] Remove unneeded vec Signed-off-by: Andrea Gunderson --- example/intkey_multiply/cli/src/multiply.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/intkey_multiply/cli/src/multiply.rs b/example/intkey_multiply/cli/src/multiply.rs index 5da77c1f..c7f25dd4 100644 --- a/example/intkey_multiply/cli/src/multiply.rs +++ b/example/intkey_multiply/cli/src/multiply.rs @@ -34,7 +34,7 @@ pub fn do_multiply( let public_key = context.get_public_key(&private_key)?.as_hex(); let factory = signing::CryptoFactory::new(&*context); let signer = factory.new_signer(&private_key); - let payload = vec![name_a, name_b, name_c].join(","); + let payload = [name_a, name_b, name_c].join(","); let txn_payload = payload.as_bytes(); if output.is_empty() {