Implement Into<Element> for &'static str in iced_virtual

This commit is contained in:
Héctor Ramón Jiménez 2022-02-10 23:16:21 +07:00
parent 5225e0e304
commit e03de01988
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
5 changed files with 27 additions and 14 deletions

View file

@ -21,9 +21,9 @@ where
{
pub fn new(
state: &'a mut State<Message, Renderer>,
content: Element<Message, Renderer>,
content: impl Into<Element<Message, Renderer>>,
) -> Self {
let _ = state.diff(content);
let _ = state.diff(content.into());
Self { state }
}