Skip to content

Commit aedd6d3

Browse files
committed
refactor: impl Default for TargetConfig
1 parent 594cb93 commit aedd6d3

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/cargo/util/config/target.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub struct TargetCfgConfig {
2121
}
2222

2323
/// Config definition of a `[target]` table or `[host]`.
24-
#[derive(Debug, Clone)]
24+
#[derive(Debug, Clone, Default)]
2525
pub struct TargetConfig {
2626
/// Process to run as a wrapper for `cargo run`, `test`, and `bench` commands.
2727
pub runner: OptValue<PathAndArgs>,
@@ -97,13 +97,7 @@ pub(super) fn load_host_triple(gctx: &GlobalContext, triple: &str) -> CargoResul
9797
};
9898
load_config_table(gctx, &host_prefix)
9999
} else {
100-
Ok(TargetConfig {
101-
runner: None,
102-
rustflags: None,
103-
rustdocflags: None,
104-
linker: None,
105-
links_overrides: BTreeMap::new(),
106-
})
100+
Ok(TargetConfig::default())
107101
}
108102
}
109103

0 commit comments

Comments
 (0)