Apply suggestions from code review

Inline variables in `format!`

Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
This commit is contained in:
Mo 2024-08-09 15:42:02 +02:00 committed by GitHub
parent e45c2c0eaa
commit af04e54235
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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)
}