Skip to content

Commit 96317b0

Browse files
art049claude
andcommitted
chore: bump rust toolchain to 1.88.0
- Fix clippy::uninlined-format-args warnings by using inline format variables - Fix unpredictable-function-pointer-comparisons error by using pointer casting - Update all format strings to use inline variable syntax 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent d78ae4a commit 96317b0

File tree

10 files changed

+15
-18
lines changed

10 files changed

+15
-18
lines changed

crates/cargo-codspeed/src/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl BuildOptions<'_> {
5656
println!("{}", &msg.message);
5757
}
5858
Message::TextLine(line) => {
59-
println!("{}", line);
59+
println!("{line}");
6060
}
6161
Message::CompilerArtifact(artifact)
6262
if artifact.target.is_kind(TargetKind::Bench) =>

crates/cargo-codspeed/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn main() {
1717
};
1818

1919
if let Err(e) = app::run(args_vec.into_iter()) {
20-
eprintln!("{}", e);
20+
eprintln!("{e}");
2121
exit(1);
2222
}
2323
}

crates/cargo-codspeed/src/run.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,11 @@ pub fn run_benches(
161161
.or(status.signal().map(|s| 128 + s)) // 128+N indicates that a command was interrupted by signal N (see: https://tldp.org/LDP/abs/html/exitcodes.html)
162162
.unwrap_or(1);
163163

164-
eprintln!(
165-
"failed to execute the benchmark process, exit code: {}",
166-
code
167-
);
164+
eprintln!("failed to execute the benchmark process, exit code: {code}");
168165
std::process::exit(code);
169166
}
170167
})?;
171-
eprintln!("Done running {}", bench_name);
168+
eprintln!("Done running {bench_name}");
172169
}
173170
eprintln!("Finished running {} benchmark suite(s)", to_run.len());
174171

crates/cargo-codspeed/tests/helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub fn setup(dir: &str, project: Project) -> String {
3232
copy_opts.content_only = true;
3333
copy(dir, &tmp_dir, &copy_opts).unwrap();
3434
if env::var("DEBUG").is_ok() {
35-
println!("tmp_dir={:?}", tmp_dir);
35+
println!("tmp_dir={tmp_dir:?}");
3636
}
3737

3838
let package_root = PathBuf::from_str(env!("CARGO_MANIFEST_DIR")).unwrap();

crates/codspeed/src/walltime_results.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ impl WalltimeBenchmark {
192192
let output_dir = result_dir_from_workspace_root(workspace_root).join(scope);
193193
std::fs::create_dir_all(&output_dir).unwrap();
194194
let bench_id = uuid::Uuid::new_v4().to_string();
195-
let output_path = output_dir.join(format!("{}.json", bench_id));
195+
let output_path = output_dir.join(format!("{bench_id}.json"));
196196
let mut writer = std::fs::File::create(&output_path).expect("Failed to create the file");
197197
serde_json::to_writer_pretty(&mut writer, self).expect("Failed to write the data");
198198
writer.flush().expect("Failed to flush the writer");

crates/criterion_compat/src/compat/group.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ impl<'a, M: Measurement> BenchmarkGroup<'a, M> {
6868
self.group_name,
6969
);
7070
if let Some(function_name) = id.function_name {
71-
uri = format!("{}::{}", uri, function_name);
71+
uri = format!("{uri}::{function_name}");
7272
}
7373
if let Some(parameter) = id.parameter {
74-
uri = format!("{}[{}]", uri, parameter);
74+
uri = format!("{uri}[{parameter}]");
7575
}
7676
let mut b = Bencher::new(self.codspeed.clone(), uri);
7777
f(&mut b, input);
@@ -129,7 +129,7 @@ impl BenchmarkId {
129129
) -> BenchmarkId {
130130
BenchmarkId {
131131
function_name: Some(function_name.into()),
132-
parameter: Some(format!("{}", parameter)),
132+
parameter: Some(format!("{parameter}")),
133133
}
134134
}
135135

@@ -138,7 +138,7 @@ impl BenchmarkId {
138138
pub fn from_parameter<P: ::std::fmt::Display>(parameter: P) -> BenchmarkId {
139139
BenchmarkId {
140140
function_name: None,
141-
parameter: Some(format!("{}", parameter)),
141+
parameter: Some(format!("{parameter}")),
142142
}
143143
}
144144

@@ -152,7 +152,7 @@ impl BenchmarkId {
152152
pub(crate) fn no_function_with_input<P: ::std::fmt::Display>(parameter: P) -> BenchmarkId {
153153
BenchmarkId {
154154
function_name: None,
155-
parameter: Some(format!("{}", parameter)),
155+
parameter: Some(format!("{parameter}")),
156156
}
157157
}
158158
}

crates/divan_compat/divan_fork/src/entry/generic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ impl EntryConst {
153153
/// Returns [`PartialOrd::partial_cmp`] ordering if `<` or `>, falling back
154154
/// to comparing [`ToString::to_string`] otherwise.
155155
pub(crate) fn cmp_name(&self, other: &Self) -> Ordering {
156-
if self.partial_cmp == other.partial_cmp {
156+
if self.partial_cmp as usize == other.partial_cmp as usize {
157157
// SAFETY: Both constants have the same comparison function, so they
158158
// must be the same type.
159159
if let Some(ordering) = unsafe { (self.partial_cmp)(self.value, other.value) } {

crates/divan_compat/examples/benches/env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ fn main() {
55
#[divan::bench]
66
fn print_env_hello() {
77
let env_var = std::env::var("MY_ENV_VAR").unwrap_or("not set".to_string());
8-
println!("MY_ENV_VAR is {}", env_var);
8+
println!("MY_ENV_VAR is {env_var}");
99
}

crates/divan_compat/src/compat/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub fn main() {
5858
if let Some(options) = &meta.bench_options {
5959
if let Some(true) = options.ignore {
6060
let uri = uri::generate(&entry, entry.display_name());
61-
println!("Skipped: {}", uri);
61+
println!("Skipped: {uri}");
6262
continue;
6363
}
6464
}

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[toolchain]
2-
channel = "1.84"
2+
channel = "1.88"

0 commit comments

Comments
 (0)