Avoid cloning placeholder for PickList unnecessarily during draw
This commit is contained in:
parent
1b36068847
commit
a866f8742e
2 changed files with 6 additions and 4 deletions
|
|
@ -285,7 +285,7 @@ where
|
|||
layout.bounds(),
|
||||
cursor_position,
|
||||
self.selected.as_ref().map(ToString::to_string),
|
||||
self.placeholder.clone(),
|
||||
self.placeholder.as_ref().map(String::as_str),
|
||||
self.padding,
|
||||
self.text_size.unwrap_or(renderer.default_size()),
|
||||
self.font,
|
||||
|
|
@ -346,7 +346,7 @@ pub trait Renderer: text::Renderer + menu::Renderer {
|
|||
bounds: Rectangle,
|
||||
cursor_position: Point,
|
||||
selected: Option<String>,
|
||||
placeholder: Option<String>,
|
||||
placeholder: Option<&str>,
|
||||
padding: Padding,
|
||||
text_size: u16,
|
||||
font: Self::Font,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue