Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Inline variables in `format!`

Co-authored-by: Weihang Lo <[email protected]>
  • Loading branch information
2 people authored and antoniospg committed Sep 8, 2024
1 parent 694d77d commit 7554af6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/rustfix/tests/parse_and_replace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ fn get_fixture_files(p: &str) -> Result<Vec<PathBuf>, 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;

Expand Down
2 changes: 1 addition & 1 deletion src/cargo/ops/cargo_add/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ fn find_workspace_dep(toml_key: &str, root_manifest: &Path) -> CargoResult<Depen
.context("could not make `dependencies` into a table")?;
let dep_item = dependencies
.get(toml_key)
.with_context(|| format!("could not find {} in `workspace.dependencies`", toml_key))?;
.with_context(|| format!("could not find {toml_key} in `workspace.dependencies`"))?;
Dependency::from_toml(root_manifest.parent().unwrap(), toml_key, dep_item)
}

Expand Down

0 comments on commit 7554af6

Please sign in to comment.