From 62725a76ef4f567c16d569fb5da5ffcc0481cb2a Mon Sep 17 00:00:00 2001 From: Nikolai Vazquez Date: Fri, 29 Nov 2019 20:52:26 -0500 Subject: Add `From` impls for `Length`, `Point`, and `Size` --- core/src/length.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/src/length.rs') 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 for Length { + fn from(units: u16) -> Self { + Length::Units(units) + } +} -- cgit