1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 19:34:24 +02:00

refactor: fix clippy warning

This commit is contained in:
Jake Stanger 2022-10-15 16:19:21 +01:00
parent bd5bdf5af5
commit 1b853bcb71
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61

View file

@ -35,7 +35,7 @@ fn create_button(
tx: &Sender<String>,
) -> Button {
let button = Button::builder()
.label(name_map.get(name).map(|str| str.as_str()).unwrap_or(name))
.label(name_map.get(name).map_or(name, String::as_str))
.build();
let style_context = button.style_context();