diff --git a/reffect/src/render_util/font.rs b/reffect/src/render_util/font.rs index 0c2a0ca..9e4f230 100644 --- a/reffect/src/render_util/font.rs +++ b/reffect/src/render_util/font.rs @@ -174,10 +174,7 @@ impl LoadedFont { if font_select_with_preview( ui, label, - self.name - .as_ref() - .map(|name| name.as_str()) - .unwrap_or("Inherit"), + self.name.as_deref().unwrap_or("Inherit"), &mut self.loaded, ) { self.name = self.loaded.map(|font| font.name_owned());