Skip to content

Commit ef39572

Browse files
committed
refactor: use arg capture for TargetConfig construction
1 parent aedd6d3 commit ef39572

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/cargo/util/config/target.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ fn load_config_table(gctx: &GlobalContext, prefix: &str) -> CargoResult<TargetCo
113113
// because it causes serde to use `deserialize_map` which means the config
114114
// deserializer does not know which keys to deserialize, which means
115115
// environment variables would not work.
116-
let runner: OptValue<PathAndArgs> = gctx.get(&format!("{}.runner", prefix))?;
117-
let rustflags: OptValue<StringList> = gctx.get(&format!("{}.rustflags", prefix))?;
118-
let rustdocflags: OptValue<StringList> = gctx.get(&format!("{}.rustdocflags", prefix))?;
119-
let linker: OptValue<ConfigRelativePath> = gctx.get(&format!("{}.linker", prefix))?;
116+
let runner: OptValue<PathAndArgs> = gctx.get(&format!("{prefix}.runner"))?;
117+
let rustflags: OptValue<StringList> = gctx.get(&format!("{prefix}.rustflags"))?;
118+
let rustdocflags: OptValue<StringList> = gctx.get(&format!("{prefix}.rustdocflags"))?;
119+
let linker: OptValue<ConfigRelativePath> = gctx.get(&format!("{prefix}.linker"))?;
120120
// Links do not support environment variables.
121121
let target_key = ConfigKey::from_str(prefix);
122122
let links_overrides = match gctx.get_table(&target_key)? {

0 commit comments

Comments
 (0)