未验证 提交 8ca3cb90 编写于 作者: G Guillaume Gomez 提交者: GitHub

Rollup merge of #55391 - matthiaskrgr:bootstrap_cleanup, r=TimNN

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.
......@@ -777,10 +777,10 @@ fn cc(&self, target: Interned<String>) -> &Path {
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册