From 7554af6d10ed2d22bc886d4c1d6c8248bdb46686 Mon Sep 17 00:00:00 2001 From: Mo <76752051+mo8it@users.noreply.github.com> Date: Fri, 9 Aug 2024 15:42:02 +0200 Subject: [PATCH] Apply suggestions from code review Inline variables in `format!` Co-authored-by: Weihang Lo --- crates/rustfix/tests/parse_and_replace.rs | 2 +- src/cargo/ops/cargo_add/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/rustfix/tests/parse_and_replace.rs b/crates/rustfix/tests/parse_and_replace.rs index 11905c69ba2..0c7e64a3b2a 100644 --- a/crates/rustfix/tests/parse_and_replace.rs +++ b/crates/rustfix/tests/parse_and_replace.rs @@ -234,7 +234,7 @@ fn get_fixture_files(p: &str) -> Result, Error> { fn assert_fixtures(dir: &str, mode: &str) { let files = get_fixture_files(dir) - .with_context(|| format!("couldn't load dir `{}`", dir)) + .with_context(|| format!("couldn't load dir `{dir}`")) .unwrap(); let mut failures = 0; diff --git a/src/cargo/ops/cargo_add/mod.rs b/src/cargo/ops/cargo_add/mod.rs index 22a1f8a7004..c6f71847df3 100644 --- a/src/cargo/ops/cargo_add/mod.rs +++ b/src/cargo/ops/cargo_add/mod.rs @@ -1087,7 +1087,7 @@ fn find_workspace_dep(toml_key: &str, root_manifest: &Path) -> CargoResult