Skip to content

Commit

Permalink
Clippy cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Apr 11, 2024
1 parent 33bc331 commit b3a83de
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions aws-lc-fips-sys/builder/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ fn test_command(executable: &OsStr, args: &[&OsStr]) -> TestCommandResult {
any(target_env = "gnu", target_env = "musl", target_env = "")
))
))]
fn generate_bindings(manifest_dir: &Path, prefix: Option<String>, bindings_path: &PathBuf) {
fn generate_bindings(manifest_dir: &Path, prefix: &Option<String>, bindings_path: &PathBuf) {
let options = BindingOptions {
build_prefix: prefix.clone(),
include_ssl: cfg!(feature = "ssl"),
Expand All @@ -193,7 +193,7 @@ fn generate_bindings(manifest_dir: &Path, prefix: Option<String>, bindings_path:
}

#[cfg(feature = "bindgen")]
fn generate_src_bindings(manifest_dir: &Path, prefix: Option<String>, src_bindings_path: &Path) {
fn generate_src_bindings(manifest_dir: &Path, prefix: &Option<String>, src_bindings_path: &Path) {
bindgen::generate_bindings(
manifest_dir,
&BindingOptions {
Expand Down Expand Up @@ -351,7 +351,7 @@ fn main() {
#[cfg(feature = "bindgen")]
{
let src_bindings_path = Path::new(&manifest_dir).join("src");
generate_src_bindings(&manifest_dir, prefix.clone(), &src_bindings_path);
generate_src_bindings(&manifest_dir, &prefix, &src_bindings_path);
bindings_available = true;
}
} else if is_bindgen_required() {
Expand All @@ -365,7 +365,7 @@ fn main() {
))]
if !is_external_bindgen() {
let gen_bindings_path = out_dir().join("bindings.rs");
generate_bindings(&manifest_dir, prefix.clone(), &gen_bindings_path);
generate_bindings(&manifest_dir, &prefix, &gen_bindings_path);
emit_rustc_cfg("use_bindgen_generated");
bindings_available = true;
}
Expand Down Expand Up @@ -454,7 +454,7 @@ pub(crate) struct BindingOptions {
fn invoke_external_bindgen(
manifest_dir: &Path,
prefix: &Option<String>,
gen_bindings_path: &PathBuf,
gen_bindings_path: &Path,
) -> Result<(), String> {
if !test_command("bindgen".as_ref(), &["--version".as_ref()]).status {
return Err("External bindgen command not found.".to_string());
Expand Down

0 comments on commit b3a83de

Please sign in to comment.