fix(cosmic-config-derive): do not return error when getting config which is not set
This commit is contained in:
parent
422d912634
commit
0ac1c3d7e8
1 changed files with 1 additions and 0 deletions
|
|
@ -55,6 +55,7 @@ fn impl_cosmic_config_entry_macro(ast: &syn::DeriveInput) -> TokenStream {
|
||||||
quote! {
|
quote! {
|
||||||
match cosmic_config::ConfigGet::get::<#field_type>(config, stringify!(#field_name)) {
|
match cosmic_config::ConfigGet::get::<#field_type>(config, stringify!(#field_name)) {
|
||||||
Ok(#field_name) => default.#field_name = #field_name,
|
Ok(#field_name) => default.#field_name = #field_name,
|
||||||
|
Err(why) if matches!(why, cosmic_config::Error::NoConfigDirectory) => (),
|
||||||
Err(e) => errors.push(e),
|
Err(e) => errors.push(e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue