Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 291cadb

Browse files
authored
Merge pull request rust-lang#1355 from matthiaskrgr/clippy_perf
clippy::perf fixes
2 parents 4a1c2d9 + 1a072c5 commit 291cadb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ pub(crate) fn compile_fn(
192192
let pass_times = cranelift_codegen::timing::take_current();
193193
// Replace newlines with | as measureme doesn't allow control characters like
194194
// newlines inside strings.
195-
recorder.record_arg(format!("{}", pass_times).replace("\n", " | "));
195+
recorder.record_arg(format!("{}", pass_times).replace('\n', " | "));
196196
recording_args = true;
197197
},
198198
)

src/global_asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pub(crate) fn compile_global_asm(
125125
let output_object_file = config.output_filenames.temp_path(OutputType::Object, Some(cgu_name));
126126

127127
// Assemble `global_asm`
128-
let global_asm_object_file = add_file_stem_postfix(output_object_file.clone(), ".asm");
128+
let global_asm_object_file = add_file_stem_postfix(output_object_file, ".asm");
129129
let mut child = Command::new(&config.assembler)
130130
.arg("-o")
131131
.arg(&global_asm_object_file)

src/pretty_clif.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ pub(crate) fn write_clif_file(
245245
for flag in isa.flags().iter() {
246246
writeln!(file, "set {}", flag)?;
247247
}
248-
write!(file, "target {}", isa.triple().architecture.to_string())?;
248+
write!(file, "target {}", isa.triple().architecture)?;
249249
for isa_flag in isa.isa_flags().iter() {
250250
write!(file, " {}", isa_flag)?;
251251
}

0 commit comments

Comments
 (0)