Skip to content

Commit 81a7164

Browse files
committed
Remove trivial new() implementation
1 parent 76b2108 commit 81a7164

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/dist/config.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ impl Config {
2121
pub(crate) fn stringify(&self) -> Result<String> {
2222
Ok(toml::to_string(&self)?)
2323
}
24-
25-
pub(crate) fn new() -> Self {
26-
Default::default()
27-
}
2824
}
2925

3026
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]

src/dist/manifestation.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,10 @@ impl Manifestation {
285285
// that identify installed components. The rust-installer metadata maintained by
286286
// `Components` *also* tracks what is installed, but it only tracks names, not
287287
// name/target. Needs to be fixed in rust-installer.
288-
let mut new_config = Config::new();
289-
new_config.components = update.final_component_list;
288+
let new_config = Config {
289+
components: update.final_component_list,
290+
..Config::default()
291+
};
290292
let config_str = new_config.stringify()?;
291293
let rel_config_path = prefix.rel_manifest_file(CONFIG_FILE);
292294
let config_path = prefix.path().join(&rel_config_path);

0 commit comments

Comments
 (0)