Skip to content

Commit

Permalink
fix(cosmic-config-derive): do not return error when getting config wh…
Browse files Browse the repository at this point in the history
…ich is not set
  • Loading branch information
mmstick authored and jackpot51 committed Mar 7, 2024
1 parent 422d912 commit 0ac1c3d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cosmic-config-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ fn impl_cosmic_config_entry_macro(ast: &syn::DeriveInput) -> TokenStream {
quote! {
match cosmic_config::ConfigGet::get::<#field_type>(config, stringify!(#field_name)) {
Ok(#field_name) => default.#field_name = #field_name,
Err(why) if matches!(why, cosmic_config::Error::NoConfigDirectory) => (),
Err(e) => errors.push(e),
}
}
Expand Down

0 comments on commit 0ac1c3d

Please sign in to comment.