diff --git a/wgpu/src/widget/canvas/text.rs b/wgpu/src/widget/canvas/text.rs index 0589c35d..c4cae30e 100644 --- a/wgpu/src/widget/canvas/text.rs +++ b/wgpu/src/widget/canvas/text.rs @@ -41,3 +41,9 @@ impl From for Text { } } } + +impl From<&str> for Text { + fn from(content: &str) -> Text { + String::from(content).into() + } +}