Implement From<&str>
for canvas::Text
This commit is contained in:
parent
a2296b466b
commit
5c923fce48
@ -41,3 +41,9 @@ impl From<String> for Text {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&str> for Text {
|
||||
fn from(content: &str) -> Text {
|
||||
String::from(content).into()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user