Make clippy happy again

This commit is contained in:
Brendan Hansknecht 2021-09-16 22:34:55 -07:00
parent d8d147375d
commit 66a7a3aa07
3 changed files with 12 additions and 10 deletions

View file

@ -101,7 +101,7 @@ pub fn build_file<'a>(
opt_level, opt_level,
surgically_link, surgically_link,
host_input_path.clone(), host_input_path.clone(),
target.clone(), target,
loaded loaded
.exposed_to_host .exposed_to_host
.keys() .keys()
@ -227,7 +227,7 @@ pub fn build_file<'a>(
// Step 2: link the precompiled host and compiled app // Step 2: link the precompiled host and compiled app
let link_start = SystemTime::now(); let link_start = SystemTime::now();
let outcome = if surgically_link { 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(|_| { .map_err(|_| {
todo!("gracefully handle failing to surgically link"); todo!("gracefully handle failing to surgically link");
})?; })?;
@ -274,7 +274,7 @@ fn spawn_rebuild_thread(
opt_level: OptLevel, opt_level: OptLevel,
surgically_link: bool, surgically_link: bool,
host_input_path: PathBuf, host_input_path: PathBuf,
target: Triple, target: &Triple,
exported_symbols: Vec<String>, exported_symbols: Vec<String>,
) -> std::thread::JoinHandle<u128> { ) -> std::thread::JoinHandle<u128> {
let thread_local_target = target.clone(); let thread_local_target = target.clone();

View file

@ -76,6 +76,7 @@ fn find_wasi_libc_path() -> PathBuf {
} }
#[cfg(not(target_os = "macos"))] #[cfg(not(target_os = "macos"))]
#[allow(clippy::too_many_arguments)]
pub fn build_zig_host_native( pub fn build_zig_host_native(
env_path: &str, env_path: &str,
env_home: &str, env_home: &str,
@ -120,6 +121,7 @@ pub fn build_zig_host_native(
} }
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
#[allow(clippy::too_many_arguments)]
pub fn build_zig_host_native( pub fn build_zig_host_native(
env_path: &str, env_path: &str,
env_home: &str, env_home: &str,

View file

@ -253,10 +253,10 @@ fn generate_dynamic_lib(
pub fn preprocess(matches: &ArgMatches) -> io::Result<i32> { pub fn preprocess(matches: &ArgMatches) -> io::Result<i32> {
preprocess_impl( preprocess_impl(
&matches.value_of(EXEC).unwrap(), matches.value_of(EXEC).unwrap(),
&matches.value_of(METADATA).unwrap(), matches.value_of(METADATA).unwrap(),
&matches.value_of(OUT).unwrap(), matches.value_of(OUT).unwrap(),
&matches.value_of(SHARED_LIB).unwrap(), matches.value_of(SHARED_LIB).unwrap(),
matches.is_present(FLAG_VERBOSE), matches.is_present(FLAG_VERBOSE),
matches.is_present(FLAG_TIME), matches.is_present(FLAG_TIME),
) )
@ -1061,9 +1061,9 @@ fn preprocess_impl(
pub fn surgery(matches: &ArgMatches) -> io::Result<i32> { pub fn surgery(matches: &ArgMatches) -> io::Result<i32> {
surgery_impl( surgery_impl(
&matches.value_of(APP).unwrap(), matches.value_of(APP).unwrap(),
&matches.value_of(METADATA).unwrap(), matches.value_of(METADATA).unwrap(),
&matches.value_of(OUT).unwrap(), matches.value_of(OUT).unwrap(),
matches.is_present(FLAG_VERBOSE), matches.is_present(FLAG_VERBOSE),
matches.is_present(FLAG_TIME), matches.is_present(FLAG_TIME),
) )