diff --git a/cli/src/build.rs b/cli/src/build.rs index eed7578b3e..defb8e0781 100644 --- a/cli/src/build.rs +++ b/cli/src/build.rs @@ -101,7 +101,7 @@ pub fn build_file<'a>( opt_level, surgically_link, host_input_path.clone(), - target.clone(), + target, loaded .exposed_to_host .keys() @@ -227,7 +227,7 @@ pub fn build_file<'a>( // Step 2: link the precompiled host and compiled app let link_start = SystemTime::now(); let outcome = if surgically_link { - roc_linker::link_preprocessed_host(target, &host_input_path, &app_o_file, &binary_path) + roc_linker::link_preprocessed_host(target, &host_input_path, app_o_file, &binary_path) .map_err(|_| { todo!("gracefully handle failing to surgically link"); })?; @@ -274,7 +274,7 @@ fn spawn_rebuild_thread( opt_level: OptLevel, surgically_link: bool, host_input_path: PathBuf, - target: Triple, + target: &Triple, exported_symbols: Vec, ) -> std::thread::JoinHandle { let thread_local_target = target.clone(); diff --git a/compiler/build/src/link.rs b/compiler/build/src/link.rs index 1d5a834c55..6d61145cc1 100644 --- a/compiler/build/src/link.rs +++ b/compiler/build/src/link.rs @@ -76,6 +76,7 @@ fn find_wasi_libc_path() -> PathBuf { } #[cfg(not(target_os = "macos"))] +#[allow(clippy::too_many_arguments)] pub fn build_zig_host_native( env_path: &str, env_home: &str, @@ -120,6 +121,7 @@ pub fn build_zig_host_native( } #[cfg(target_os = "macos")] +#[allow(clippy::too_many_arguments)] pub fn build_zig_host_native( env_path: &str, env_home: &str, diff --git a/linker/src/lib.rs b/linker/src/lib.rs index 3613489e4f..2324671cc9 100644 --- a/linker/src/lib.rs +++ b/linker/src/lib.rs @@ -253,10 +253,10 @@ fn generate_dynamic_lib( pub fn preprocess(matches: &ArgMatches) -> io::Result { preprocess_impl( - &matches.value_of(EXEC).unwrap(), - &matches.value_of(METADATA).unwrap(), - &matches.value_of(OUT).unwrap(), - &matches.value_of(SHARED_LIB).unwrap(), + matches.value_of(EXEC).unwrap(), + matches.value_of(METADATA).unwrap(), + matches.value_of(OUT).unwrap(), + matches.value_of(SHARED_LIB).unwrap(), matches.is_present(FLAG_VERBOSE), matches.is_present(FLAG_TIME), ) @@ -1061,9 +1061,9 @@ fn preprocess_impl( pub fn surgery(matches: &ArgMatches) -> io::Result { surgery_impl( - &matches.value_of(APP).unwrap(), - &matches.value_of(METADATA).unwrap(), - &matches.value_of(OUT).unwrap(), + matches.value_of(APP).unwrap(), + matches.value_of(METADATA).unwrap(), + matches.value_of(OUT).unwrap(), matches.is_present(FLAG_VERBOSE), matches.is_present(FLAG_TIME), )