Merge pull request #1355 from matthiaskrgr/clippy_perf
clippy::perf fixes
This commit is contained in:
commit
291cadb2d8
@ -192,7 +192,7 @@ pub(crate) fn compile_fn(
|
||||
let pass_times = cranelift_codegen::timing::take_current();
|
||||
// Replace newlines with | as measureme doesn't allow control characters like
|
||||
// newlines inside strings.
|
||||
recorder.record_arg(format!("{}", pass_times).replace("\n", " | "));
|
||||
recorder.record_arg(format!("{}", pass_times).replace('\n', " | "));
|
||||
recording_args = true;
|
||||
},
|
||||
)
|
||||
|
@ -125,7 +125,7 @@ pub(crate) fn compile_global_asm(
|
||||
let output_object_file = config.output_filenames.temp_path(OutputType::Object, Some(cgu_name));
|
||||
|
||||
// Assemble `global_asm`
|
||||
let global_asm_object_file = add_file_stem_postfix(output_object_file.clone(), ".asm");
|
||||
let global_asm_object_file = add_file_stem_postfix(output_object_file, ".asm");
|
||||
let mut child = Command::new(&config.assembler)
|
||||
.arg("-o")
|
||||
.arg(&global_asm_object_file)
|
||||
|
@ -245,7 +245,7 @@ pub(crate) fn write_clif_file(
|
||||
for flag in isa.flags().iter() {
|
||||
writeln!(file, "set {}", flag)?;
|
||||
}
|
||||
write!(file, "target {}", isa.triple().architecture.to_string())?;
|
||||
write!(file, "target {}", isa.triple().architecture)?;
|
||||
for isa_flag in isa.isa_flags().iter() {
|
||||
write!(file, " {}", isa_flag)?;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user