mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
Apply suggestions from code review
Inline variables in `format!` Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
This commit is contained in:
parent
e45c2c0eaa
commit
af04e54235
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user