Skip to content

Commit 239ebf4

Browse files
committed
Fix several needless_borrow clippy lints.
1 parent 6e1ca92 commit 239ebf4

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/bin/cargo/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Run with 'cargo -Z [FLAG] [SUBCOMMAND]'"
102102
}
103103
};
104104
config_configure(config, &args, subcommand_args)?;
105-
super::init_git_transports(&config);
105+
super::init_git_transports(config);
106106

107107
execute_subcommand(config, cmd, subcommand_args)
108108
}

src/cargo/core/compiler/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ pub fn extern_args<'a>(
10081008

10091009
for dep in deps {
10101010
if dep.unit.target.linkable() && !dep.unit.mode.is_doc() {
1011-
link_to(&dep, dep.extern_crate_name, dep.noprelude)?;
1011+
link_to(dep, dep.extern_crate_name, dep.noprelude)?;
10121012
}
10131013
}
10141014
if unit.target.proc_macro()

src/cargo/util/config/de.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,11 @@ impl<'de, 'config> de::MapAccess<'de> for ConfigMapAccess<'config> {
291291
// Set this as the current key in the deserializer.
292292
let field = match field {
293293
KeyKind::Normal(field) => {
294-
self.de.key.push(&field);
294+
self.de.key.push(field);
295295
field
296296
}
297297
KeyKind::CaseSensitive(field) => {
298-
self.de.key.push_sensitive(&field);
298+
self.de.key.push_sensitive(field);
299299
field
300300
}
301301
};

src/cargo/util/config/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ impl Config {
832832
for arg in cli_args {
833833
// TODO: This should probably use a more narrow parser, reject
834834
// comments, blank lines, [headers], etc.
835-
let toml_v: toml::Value = toml::de::from_str(&arg)
835+
let toml_v: toml::Value = toml::de::from_str(arg)
836836
.chain_err(|| format!("failed to parse --config argument `{}`", arg))?;
837837
let toml_table = toml_v.as_table().unwrap();
838838
if toml_table.len() != 1 {

src/cargo/util/config/target.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ fn parse_links_overrides(
113113
"rustc-flags" => {
114114
let flags = value.string(key)?;
115115
let whence = format!("target config `{}.{}` (in {})", target_key, key, flags.1);
116-
let (paths, links) = BuildOutput::parse_rustc_flags(&flags.0, &whence)?;
116+
let (paths, links) = BuildOutput::parse_rustc_flags(flags.0, &whence)?;
117117
output.library_paths.extend(paths);
118118
output.library_links.extend(links);
119119
}

0 commit comments

Comments
 (0)