Skip to content

Commit

Permalink
Rollup merge of #107895 - matthiaskrgr:cl, r=compiler-errors
Browse files Browse the repository at this point in the history
remove redundant clones
  • Loading branch information
matthiaskrgr authored Feb 11, 2023
2 parents 420e756 + 5201bb5 commit 4b7b569
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_ssa/src/back/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
}
}

self.src_archives.push((archive_path.to_owned(), archive_map));
self.src_archives.push((archive_path, archive_map));
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_log/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub fn init_env_logger(env: &str) -> Result<(), Error> {
let fmt_layer = tracing_subscriber::fmt::layer()
.with_writer(io::stderr)
.without_time()
.event_format(BacktraceFormatter { backtrace_target: str.to_string() });
.event_format(BacktraceFormatter { backtrace_target: str });
let subscriber = subscriber.with(fmt_layer);
tracing::subscriber::set_global_default(subscriber).unwrap();
}
Expand Down
4 changes: 1 addition & 3 deletions compiler/rustc_parse_format/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -847,9 +847,7 @@ impl<'a> Parser<'a> {
0,
ParseError {
description: "expected format parameter to occur after `:`".to_owned(),
note: Some(
format!("`?` comes after `:`, try `{}:{}` instead", word, "?").to_owned(),
),
note: Some(format!("`?` comes after `:`, try `{}:{}` instead", word, "?")),
label: "expected `?` to occur after `:`".to_owned(),
span: pos.to(pos),
secondary_label: None,
Expand Down

0 comments on commit 4b7b569

Please sign in to comment.