diff --git a/wgpu/src/widget/canvas/text.rs b/wgpu/src/widget/canvas/text.rs index d1cf1a0f..0589c35d 100644 --- a/wgpu/src/widget/canvas/text.rs +++ b/wgpu/src/widget/canvas/text.rs @@ -32,3 +32,12 @@ impl Default for Text { } } } + +impl From for Text { + fn from(content: String) -> Text { + Text { + content, + ..Default::default() + } + } +}