Fix is_empty() Option<String> filtering
This commit is contained in:
parent
d073dde8ca
commit
a6b675dd11
|
@ -46,9 +46,9 @@ impl Notifications {
|
||||||
timeout: i32,
|
timeout: i32,
|
||||||
) -> u32 {
|
) -> u32 {
|
||||||
let contents = Contents {
|
let contents = Contents {
|
||||||
app_name: Some(app_name).filter(String::is_empty),
|
app_name: Some(app_name).filter(|s| !s.is_empty()),
|
||||||
summary,
|
summary,
|
||||||
body: Some(body).filter(String::is_empty),
|
body: Some(body).filter(|s| !s.is_empty()),
|
||||||
timeout: Some(timeout).filter(|t| *t == 0),
|
timeout: Some(timeout).filter(|t| *t == 0),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue