Skip to content

Commit ebc12fe

Browse files
committed
Derive Default for Settings
1 parent 04418ee commit ebc12fe

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/settings.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl SettingsFile {
7474
}
7575
}
7676

77-
#[derive(Clone, Debug, Eq, PartialEq)]
77+
#[derive(Clone, Debug, Default, Eq, PartialEq)]
7878
pub struct Settings {
7979
pub version: MetadataVersion,
8080
pub default_host_triple: Option<String>,
@@ -85,20 +85,6 @@ pub struct Settings {
8585
pub auto_self_update: Option<SelfUpdateMode>,
8686
}
8787

88-
impl Default for Settings {
89-
fn default() -> Self {
90-
Self {
91-
version: MetadataVersion::default(),
92-
default_host_triple: None,
93-
default_toolchain: None,
94-
profile: Some(Profile::default()),
95-
overrides: BTreeMap::new(),
96-
pgp_keys: None,
97-
auto_self_update: None,
98-
}
99-
}
100-
}
101-
10288
impl Settings {
10389
fn path_to_key(path: &Path, notify_handler: &dyn Fn(Notification<'_>)) -> String {
10490
if path.exists() {

0 commit comments

Comments
 (0)