Implement From<String> for canvas::Text

This commit is contained in:
Héctor Ramón Jiménez 2020-04-14 06:43:43 +02:00
parent 6779fcf621
commit a2296b466b

View File

@ -32,3 +32,12 @@ impl Default for Text {
}
}
}
impl From<String> for Text {
fn from(content: String) -> Text {
Text {
content,
..Default::default()
}
}
}