Skip to content

Commit

Permalink
chore: merge settings possible_values to range
Browse files Browse the repository at this point in the history
  • Loading branch information
BohuTANG committed Dec 14, 2023
1 parent ae52de2 commit 0de3b72
Show file tree
Hide file tree
Showing 6 changed files with 160 additions and 162 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/query/settings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ log = { workspace = true }
num_cpus = "1.13.1"
once_cell = { workspace = true }
sys-info = "0.9"
num = "0.4.1"
3 changes: 0 additions & 3 deletions src/query/settings/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ pub struct SettingsItem {
pub desc: &'static str,
pub user_value: UserSettingValue,
pub default_value: UserSettingValue,
pub possible_values: Option<Vec<&'static str>>,
}

pub struct SettingsIter<'a> {
Expand Down Expand Up @@ -156,15 +155,13 @@ impl<'a> Iterator for SettingsIter<'a> {
desc: default_value.desc,
user_value: default_value.value.clone(),
default_value: default_value.value,
possible_values: default_value.possible_values,
},
Some(change_value) => SettingsItem {
name: key,
level: change_value.level.clone(),
desc: default_value.desc,
user_value: change_value.value.clone(),
default_value: default_value.value,
possible_values: default_value.possible_values,
},
}),
};
Expand Down
Loading

0 comments on commit 0de3b72

Please sign in to comment.