Skip to content

Commit

Permalink
Rollup merge of rust-lang#55391 - matthiaskrgr:bootstrap_cleanup, r=T…
Browse files Browse the repository at this point in the history
…imNN

bootstrap: clean up a few clippy findings

remove useless format!()s
remove redundant field names in a few struct initializations
pass slice instead of a vector to a function
use is_empty() instead of comparisons to .len()

No functional change intended.
  • Loading branch information
pietroalbini authored Nov 28, 2018
2 parents b68fc18 + 32d07cc commit 2ac258a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -777,10 +777,10 @@ impl Build {
fn cflags(&self, target: Interned<String>, which: GitRepo) -> Vec<String> {
// Filter out -O and /O (the optimization flags) that we picked up from
// cc-rs because the build scripts will determine that for themselves.
let mut base: Vec<String> = self.cc[&target].args().iter()
let mut base = self.cc[&target].args().iter()
.map(|s| s.to_string_lossy().into_owned())
.filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
.collect::<Vec<_>>();
.collect::<Vec<String>>();

// If we're compiling on macOS then we add a few unconditional flags
// indicating that we want libc++ (more filled out than libstdc++) and
Expand Down

0 comments on commit 2ac258a

Please sign in to comment.