Skip to content

Commit

Permalink
add an indication when a setting is a global setting
Browse files Browse the repository at this point in the history
  • Loading branch information
oneElectron committed Nov 22, 2023
1 parent 5733523 commit d13000b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion itex-derive/src/print_functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ pub(super) fn generate_display_function(field: SettingsField) -> TokenStream {

match &self.#field_name {
Some(value) => {
println!("{} = {}", console::style(#field_name_string).bright().blue(), console::style(#inherited_value))
match local_settings.#field_name.clone() {
Some(v) => println!("{} = {}", console::style(#field_name_string).bright().blue(), console::style(#inherited_value)),
None => println!("{} = {} (global)", console::style(#field_name_string).bright().blue(), console::style(#inherited_value)),
}
},
None => {
println!("{} = {} (inherited)", console::style(stringify!(#field_name)).bright().blue(), #inherited_value);
Expand Down

0 comments on commit d13000b

Please sign in to comment.