diff options
author | 2019-11-29 20:52:26 -0500 | |
---|---|---|
committer | 2019-11-29 20:52:26 -0500 | |
commit | 62725a76ef4f567c16d569fb5da5ffcc0481cb2a (patch) | |
tree | f9505a4e2bc7f4f0038252caa733ba33a4e147cc /core/src/length.rs | |
parent | 811d8b90d71c26100f0933217f5474e090fbf17c (diff) | |
download | iced-62725a76ef4f567c16d569fb5da5ffcc0481cb2a.tar.gz iced-62725a76ef4f567c16d569fb5da5ffcc0481cb2a.tar.bz2 iced-62725a76ef4f567c16d569fb5da5ffcc0481cb2a.zip |
Add `From` impls for `Length`, `Point`, and `Size`
Diffstat (limited to 'core/src/length.rs')
-rw-r--r-- | core/src/length.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/length.rs b/core/src/length.rs index 63ba6207..10873e89 100644 --- a/core/src/length.rs +++ b/core/src/length.rs @@ -27,3 +27,9 @@ impl Length { } } } + +impl From<u16> for Length { + fn from(units: u16) -> Self { + Length::Units(units) + } +} |