This is an automated email from the ASF dual-hosted git repository. ivila pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/teaclave-trustzone-sdk.git
commit 74c2ec7d2b14cb5b1d00d563a7979272a33adb2a Author: ivila <[email protected]> AuthorDate: Tue Mar 3 11:25:42 2026 +0800 cargo-optee: clippy fix Signed-off-by: ivila <[email protected]> --- cargo-optee/src/ca_builder.rs | 2 +- cargo-optee/src/common.rs | 1 - cargo-optee/src/config.rs | 4 ++-- cargo-optee/src/main.rs | 2 +- cargo-optee/src/ta_builder.rs | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cargo-optee/src/ca_builder.rs b/cargo-optee/src/ca_builder.rs index 9744e33..ff643e6 100644 --- a/cargo-optee/src/ca_builder.rs +++ b/cargo-optee/src/ca_builder.rs @@ -220,7 +220,7 @@ fn copy_plugin(config: &CaBuildConfig) -> Result<PathBuf> { // Copy to <uuid>.plugin.so let plugin_dest = target_dir.join(format!("{}.plugin.so", uuid)); - std::fs::copy(&plugin_src, &plugin_dest)?; + std::fs::copy(plugin_src, &plugin_dest)?; Ok(plugin_dest) } diff --git a/cargo-optee/src/common.rs b/cargo-optee/src/common.rs index 3e711b8..7c6b418 100644 --- a/cargo-optee/src/common.rs +++ b/cargo-optee/src/common.rs @@ -17,7 +17,6 @@ use anyhow::{bail, Result}; use clap::ValueEnum; -use serde_json; use std::env; use std::fs; use std::path::PathBuf; diff --git a/cargo-optee/src/config.rs b/cargo-optee/src/config.rs index c776a9f..c1299d3 100644 --- a/cargo-optee/src/config.rs +++ b/cargo-optee/src/config.rs @@ -105,7 +105,7 @@ impl TaBuildConfig { .as_ref() .and_then(|c| c.ta_dev_kit_dir.clone()) }) - .ok_or_else(|| ta_dev_kit_dir_error())?; + .ok_or_else(ta_dev_kit_dir_error)?; // Resolve ta_dev_kit_dir path (relative to absolute) let ta_dev_kit_dir = resolve_path_relative_to_project( @@ -230,7 +230,7 @@ impl CaBuildConfig { .as_ref() .and_then(|c| c.optee_client_export.clone()) }) - .ok_or_else(|| optee_client_export_error())?; + .ok_or_else(optee_client_export_error)?; // Resolve optee_client_export path (relative to absolute) let optee_client_export = resolve_path_relative_to_project( diff --git a/cargo-optee/src/main.rs b/cargo-optee/src/main.rs index 9992d99..f84f60f 100644 --- a/cargo-optee/src/main.rs +++ b/cargo-optee/src/main.rs @@ -271,7 +271,7 @@ fn setup_cargo_environment() -> anyhow::Result<()> { let current_path = env::var("PATH").unwrap_or_default(); let separator = if cfg!(windows) { ";" } else { ":" }; let new_path = format!("{}{}{}", cargo_bin_dir.display(), separator, current_path); - env::set_var("PATH", &new_path); + env::set_var("PATH", new_path); return Ok(()); } diff --git a/cargo-optee/src/ta_builder.rs b/cargo-optee/src/ta_builder.rs index 805fd60..46f76cd 100644 --- a/cargo-optee/src/ta_builder.rs +++ b/cargo-optee/src/ta_builder.rs @@ -94,7 +94,7 @@ pub fn build_ta(config: TaBuildConfig, install_dir: Option<&Path>) -> Result<()> )?; let dest_path = install_dir.join(format!("{}.ta", uuid)); - fs::copy(&ta_file, &dest_path)?; + fs::copy(ta_file, &dest_path)?; println!( "TA installed to: {:?}", --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
