diff options
| author | pierwill <pierwill@users.noreply.github.com> | 2022-03-11 13:38:31 -0600 |
|---|---|---|
| committer | pierwill <pierwill@users.noreply.github.com> | 2022-03-11 13:38:31 -0600 |
| commit | 415d37677ed4d6dcea74302a39712d00a98978cc (patch) | |
| tree | 574fd15a25091b5a58a4183e50312465a97d6254 /src/bootstrap | |
| parent | af8604faddc44b27a59d1a719ff6ceca8bc145eb (diff) | |
| download | rust-415d37677ed4d6dcea74302a39712d00a98978cc.tar.gz rust-415d37677ed4d6dcea74302a39712d00a98978cc.zip | |
Remove unneeded conversions in bootstrapping code
Fixes warnings from `clippy::useless_conversion` in `src/bootstrap`.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/builder.rs | 12 | ||||
| -rw-r--r-- | src/bootstrap/tool.rs | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 1903f0baef1..68ae7f2be96 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -169,7 +169,7 @@ impl PathSet { fn one<P: Into<PathBuf>>(path: P, kind: Kind) -> PathSet { let mut set = BTreeSet::new(); - set.insert(TaskPath { path: path.into(), kind: Some(kind.into()) }); + set.insert(TaskPath { path: path.into(), kind: Some(kind) }); PathSet::Set(set) } @@ -372,10 +372,7 @@ impl<'a> ShouldRun<'a> { // multiple aliases for the same job pub fn paths(mut self, paths: &[&str]) -> Self { self.paths.insert(PathSet::Set( - paths - .iter() - .map(|p| TaskPath { path: p.into(), kind: Some(self.kind.into()) }) - .collect(), + paths.iter().map(|p| TaskPath { path: p.into(), kind: Some(self.kind) }).collect(), )); self } @@ -388,8 +385,7 @@ impl<'a> ShouldRun<'a> { } pub fn suite_path(mut self, suite: &str) -> Self { - self.paths - .insert(PathSet::Suite(TaskPath { path: suite.into(), kind: Some(self.kind.into()) })); + self.paths.insert(PathSet::Suite(TaskPath { path: suite.into(), kind: Some(self.kind) })); self } @@ -1769,7 +1765,7 @@ impl<'a> Builder<'a> { if should_run.paths.iter().any(|s| s.has(path, Some(desc.kind))) && !desc.is_excluded( self, - &PathSet::Suite(TaskPath { path: path.clone(), kind: Some(desc.kind.into()) }), + &PathSet::Suite(TaskPath { path: path.clone(), kind: Some(desc.kind) }), ) { return true; diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index 2ae4d830721..a9ca89bdea1 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -391,7 +391,7 @@ impl ErrorIndex { add_dylib_path( vec![ PathBuf::from(&builder.sysroot_libdir(compiler, compiler.host)), - PathBuf::from(builder.rustc_libdir(compiler)), + builder.rustc_libdir(compiler), ], &mut cmd, ); |
