Skip to content

Commit

Permalink
Remove trivial new() implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Jun 8, 2024
1 parent 7e5c2d3 commit 686defa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/dist/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ impl Config {
pub(crate) fn stringify(&self) -> anyhow::Result<String> {
Ok(toml::to_string(&self)?)
}

pub(crate) fn new() -> Self {
Default::default()
}
}

#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
Expand Down
6 changes: 4 additions & 2 deletions src/dist/manifestation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,10 @@ impl Manifestation {
// that identify installed components. The rust-installer metadata maintained by
// `Components` *also* tracks what is installed, but it only tracks names, not
// name/target. Needs to be fixed in rust-installer.
let mut new_config = Config::new();
new_config.components = update.final_component_list;
let new_config = Config {
components: update.final_component_list,
..Config::default()
};
let config_str = new_config.stringify()?;
let rel_config_path = prefix.rel_manifest_file(CONFIG_FILE);
let config_path = prefix.path().join(&rel_config_path);
Expand Down

0 comments on commit 686defa

Please sign in to comment.