diff options
Diffstat (limited to 'graphics/src/widget')
| -rw-r--r-- | graphics/src/widget/pick_list.rs | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/graphics/src/widget/pick_list.rs b/graphics/src/widget/pick_list.rs index 01283bd5..88a590b5 100644 --- a/graphics/src/widget/pick_list.rs +++ b/graphics/src/widget/pick_list.rs @@ -31,7 +31,7 @@ where          bounds: Rectangle,          cursor_position: Point,          selected: Option<String>, -        placeholder: Option<String>, +        placeholder: Option<&str>,          padding: Padding,          text_size: u16,          font: Font, @@ -70,7 +70,9 @@ where          (              Primitive::Group { -                primitives: if let Some(label) = selected.or(placeholder) { +                primitives: if let Some(label) = +                    selected.or_else(|| placeholder.map(str::to_string)) +                {                      let label = Primitive::Text {                          content: label,                          size: f32::from(text_size), | 
