Skip to content

Commit

Permalink
Resolve clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Feb 15, 2024
1 parent 4dfbd5b commit 3749ef0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ fn cargo_command(
let parsed_args = parse_cargo_args(cargo_args);

let mut command = Command::new("cargo");
command.args(&[
command.args([
cargo_cmd.to_str(),
"--message-format",
"json-diagnostic-rendered-ansi",
Expand All @@ -122,7 +122,7 @@ fn cargo_command(
error
)
})?;
command.args(&["--target", &default_target]);
command.args(["--target", &default_target]);
}

for arg in parsed_args.filtered {
Expand Down
2 changes: 1 addition & 1 deletion src/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fn check_binary_available(name: &str, resolved: anyhow::Result<PathBuf>, hint: &
println!(
"{}: found at {}",
format!("[{}]", name).bold().green(),
cli_format_path(&path.display())
cli_format_path(path.display())
);
true
}
Expand Down
2 changes: 1 addition & 1 deletion src/pgo/instrument.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub fn pgo_instrument(ctx: CargoContext, args: PgoInstrumentArgs) -> anyhow::Res
"Now run {} on your workload.\nIf your program creates multiple processes \
or you will execute it multiple times in parallel, consider running it \
with the following environment variable to have more precise profiles:\n{}",
cli_format_path(&executable),
cli_format_path(executable),
format!(
"LLVM_PROFILE_FILE={}/{}_%m_%p.profraw",
pgo_dir.display(),
Expand Down
2 changes: 1 addition & 1 deletion src/pgo/optimize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ fn merge_profiles(

// Merge profiles
let mut command = Command::new(&pgo_env.llvm_profdata);
command.args(&["merge", "-o", &profile_tmp_path.display().to_string()]);
command.args(["merge", "-o", &profile_tmp_path.display().to_string()]);
for file in &stats.profile_files {
command.arg(file);
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub fn capitalize(text: &str) -> Cow<str> {
match first {
Some(char) if char.is_uppercase() => text.into(),
Some(char) => {
let rest: String = chars.into_iter().collect();
let rest: String = chars.collect();
format!("{}{}", char.to_uppercase(), rest).into()
}
None => text.into(),
Expand Down

0 comments on commit 3749ef0

Please sign in to comment.