diff options
Diffstat (limited to 'src/text.rs')
-rw-r--r-- | src/text.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/text.rs b/src/text.rs index ee0dc8398..af0a4a9e7 100644 --- a/src/text.rs +++ b/src/text.rs | |||
@@ -32,6 +32,12 @@ impl From<TextUnit> for u32 { | |||
32 | } | 32 | } |
33 | } | 33 | } |
34 | 34 | ||
35 | impl From<u32> for TextUnit { | ||
36 | fn from(tu: u32) -> TextUnit { | ||
37 | TextUnit::new(tu) | ||
38 | } | ||
39 | } | ||
40 | |||
35 | impl ops::Add<TextUnit> for TextUnit { | 41 | impl ops::Add<TextUnit> for TextUnit { |
36 | type Output = TextUnit; | 42 | type Output = TextUnit; |
37 | fn add(self, rhs: TextUnit) -> TextUnit { | 43 | fn add(self, rhs: TextUnit) -> TextUnit { |