Skip to content

Commit 99c69f6

Browse files
authored
Merge pull request #753 from hatoo/clippy
clippy --fix
2 parents 7c118e3 + b9c03a2 commit 99c69f6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,11 +1042,11 @@ pub(crate) fn set_start_latency_correction<E>(
10421042
pub async fn work_debug<W: Write>(w: &mut W, client: Arc<Client>) -> Result<(), ClientError> {
10431043
let mut rng = StdRng::from_os_rng();
10441044
let url = client.url_generator.generate(&mut rng)?;
1045-
writeln!(w, "URL: {}", url)?;
1045+
writeln!(w, "URL: {url}")?;
10461046

10471047
let request = client.request(&url)?;
10481048

1049-
writeln!(w, "{:#?}", request)?;
1049+
writeln!(w, "{request:#?}")?;
10501050

10511051
let response = match client.work_type() {
10521052
#[cfg(feature = "http3")]
@@ -1074,7 +1074,7 @@ pub async fn work_debug<W: Write>(w: &mut W, client: Arc<Client>) -> Result<(),
10741074
}
10751075
};
10761076

1077-
writeln!(w, "{:#?}", response)?;
1077+
writeln!(w, "{response:#?}")?;
10781078

10791079
Ok(())
10801080
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ pub async fn run(mut opts: Opts) -> anyhow::Result<()> {
435435
let mut rng = rand::rng();
436436
for _ in 0..n {
437437
let url = url_generator.generate(&mut rng)?;
438-
println!("{}", url);
438+
println!("{url}");
439439
}
440440
return Ok(());
441441
}

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn main() {
1515
.unwrap();
1616

1717
if let Err(e) = rt.block_on(run(Opts::parse())) {
18-
eprintln!("Error: {}", e);
18+
eprintln!("Error: {e}");
1919
std::process::exit(libc::EXIT_FAILURE);
2020
}
2121
}

src/timescale.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ mod tests {
174174
for durations in range {
175175
let timescale = TimeScale::from_elapsed(Duration::from_secs_f64(durations));
176176
assert_eq!(timescale, expected_timescale);
177-
assert_eq!(format!("{}", timescale), expected_timescale_str);
177+
assert_eq!(format!("{timescale}"), expected_timescale_str);
178178
assert_eq!(timescale.as_secs_f64(), expected_timescale_as_secs);
179179
}
180180
}

0 commit comments

Comments
 (0)