aboutsummaryrefslogtreecommitdiff
path: root/src/text.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/text.rs')
-rw-r--r--src/text.rs6
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
35impl From<u32> for TextUnit {
36 fn from(tu: u32) -> TextUnit {
37 TextUnit::new(tu)
38 }
39}
40
35impl ops::Add<TextUnit> for TextUnit { 41impl 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 {