mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Auto merge of #10081 - hi-rustin:rustin-patch-clippy, r=ehuss
Remove needless borrow to make clippy happy Make clippy happy.
This commit is contained in:
commit
3a3a071cc8
@ -648,7 +648,7 @@ fn rustdoc(cx: &mut Context<'_, '_>, unit: &Unit) -> CargoResult<Work> {
|
||||
rustdoc.args(args);
|
||||
}
|
||||
|
||||
let metadata = cx.metadata_for_doc_units[&unit];
|
||||
let metadata = cx.metadata_for_doc_units[unit];
|
||||
rustdoc.arg("-C").arg(format!("metadata={}", metadata));
|
||||
|
||||
let scrape_output_path = |unit: &Unit| -> CargoResult<PathBuf> {
|
||||
|
@ -132,7 +132,7 @@ fn calc_deps_of_std(
|
||||
// Compute dependencies for the standard library.
|
||||
state.is_std = true;
|
||||
for roots in std_roots.values() {
|
||||
deps_of_roots(roots, &mut state)?;
|
||||
deps_of_roots(roots, state)?;
|
||||
}
|
||||
state.is_std = false;
|
||||
Ok(Some(std::mem::take(&mut state.unit_dependencies)))
|
||||
@ -172,7 +172,7 @@ fn attach_std_deps(
|
||||
|
||||
/// Compute all the dependencies of the given root units.
|
||||
/// The result is stored in state.unit_dependencies.
|
||||
fn deps_of_roots(roots: &[Unit], mut state: &mut State<'_, '_>) -> CargoResult<()> {
|
||||
fn deps_of_roots(roots: &[Unit], state: &mut State<'_, '_>) -> CargoResult<()> {
|
||||
for unit in roots.iter() {
|
||||
// Dependencies of tests/benches should not have `panic` set.
|
||||
// We check the global test mode to see if we are running in `cargo
|
||||
@ -200,7 +200,7 @@ fn deps_of_roots(roots: &[Unit], mut state: &mut State<'_, '_>) -> CargoResult<(
|
||||
} else {
|
||||
UnitFor::new_normal()
|
||||
};
|
||||
deps_of(unit, &mut state, unit_for)?;
|
||||
deps_of(unit, state, unit_for)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
@ -1248,7 +1248,7 @@ impl TomlManifest {
|
||||
for (name, platform) in me.target.iter().flatten() {
|
||||
cx.platform = {
|
||||
let platform: Platform = name.parse()?;
|
||||
platform.check_cfg_attributes(&mut cx.warnings);
|
||||
platform.check_cfg_attributes(cx.warnings);
|
||||
Some(platform)
|
||||
};
|
||||
process_dependencies(&mut cx, platform.dependencies.as_ref(), None)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user