diff options
author | 2020-04-14 06:43:58 +0200 | |
---|---|---|
committer | 2020-04-14 06:43:58 +0200 | |
commit | 5c923fce4866bcda0d2d2c1023bb046cd92038cc (patch) | |
tree | fe4bdb50ad5f7726e815b8b42db3697d2371a3c9 /wgpu | |
parent | a2296b466bdb512aeabfed0619ce0f87049717e5 (diff) | |
download | iced-5c923fce4866bcda0d2d2c1023bb046cd92038cc.tar.gz iced-5c923fce4866bcda0d2d2c1023bb046cd92038cc.tar.bz2 iced-5c923fce4866bcda0d2d2c1023bb046cd92038cc.zip |
Implement `From<&str>` for `canvas::Text`
Diffstat (limited to 'wgpu')
-rw-r--r-- | wgpu/src/widget/canvas/text.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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<String> for Text { } } } + +impl From<&str> for Text { + fn from(content: &str) -> Text { + String::from(content).into() + } +} |