Implement From<String>
for canvas::Text
This commit is contained in:
parent
6779fcf621
commit
a2296b466b
@ -32,3 +32,12 @@ impl Default for Text {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<String> for Text {
|
||||||
|
fn from(content: String) -> Text {
|
||||||
|
Text {
|
||||||
|
content,
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user