Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix several needless_borrow clippy lints. #7771

Merged
merged 1 commit into from
Jan 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/bin/cargo/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Run with 'cargo -Z [FLAG] [SUBCOMMAND]'"
}
};
config_configure(config, &args, subcommand_args)?;
super::init_git_transports(&config);
super::init_git_transports(config);

execute_subcommand(config, cmd, subcommand_args)
}
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/core/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ pub fn extern_args<'a>(

for dep in deps {
if dep.unit.target.linkable() && !dep.unit.mode.is_doc() {
link_to(&dep, dep.extern_crate_name, dep.noprelude)?;
link_to(dep, dep.extern_crate_name, dep.noprelude)?;
}
}
if unit.target.proc_macro()
Expand Down
4 changes: 2 additions & 2 deletions src/cargo/util/config/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,11 @@ impl<'de, 'config> de::MapAccess<'de> for ConfigMapAccess<'config> {
// Set this as the current key in the deserializer.
let field = match field {
KeyKind::Normal(field) => {
self.de.key.push(&field);
self.de.key.push(field);
field
}
KeyKind::CaseSensitive(field) => {
self.de.key.push_sensitive(&field);
self.de.key.push_sensitive(field);
field
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/util/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ impl Config {
for arg in cli_args {
// TODO: This should probably use a more narrow parser, reject
// comments, blank lines, [headers], etc.
let toml_v: toml::Value = toml::de::from_str(&arg)
let toml_v: toml::Value = toml::de::from_str(arg)
.chain_err(|| format!("failed to parse --config argument `{}`", arg))?;
let toml_table = toml_v.as_table().unwrap();
if toml_table.len() != 1 {
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/util/config/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ fn parse_links_overrides(
"rustc-flags" => {
let flags = value.string(key)?;
let whence = format!("target config `{}.{}` (in {})", target_key, key, flags.1);
let (paths, links) = BuildOutput::parse_rustc_flags(&flags.0, &whence)?;
let (paths, links) = BuildOutput::parse_rustc_flags(flags.0, &whence)?;
output.library_paths.extend(paths);
output.library_links.extend(links);
}
Expand Down