Skip to content

Commit

Permalink
Fix derive setter for default_icon_theme.
Browse files Browse the repository at this point in the history
Added `strip_option` to prevent compile time error.

```bash
error[E0277]: the trait bound `Option<String>: From<&str>` is not satisfied
  --> examples/application/src/main.rs:24:29
   |
24 |         .default_icon_theme("Pop")
   |          ------------------ ^^^^^^^^^ the trait `From<&str>` is not implemented for `Option<String>`
   |          |
   |          required by a bound introduced by this call
```
  • Loading branch information
edfloreshz authored Aug 10, 2023
1 parent 54d47a1 commit 09dab77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub struct Settings {
pub(crate) default_font: Font,

/// Name of the icon theme to search by default.
#[setters(into)]
#[setters(into, strip_option)]
pub(crate) default_icon_theme: Option<String>,

/// Default size of fonts.
Expand Down

0 comments on commit 09dab77

Please sign in to comment.