Use NonZeroU32 in canvas_traits

This commit is contained in:
Simon Sapin 2017-10-12 00:49:39 +02:00
parent ecf3b05153
commit 5e72173e8c
6 changed files with 16 additions and 5 deletions

View file

@ -39,6 +39,10 @@ mod imp {
}
}
pub unsafe fn new_unchecked(x: u32) -> Self {
NonZeroU32(x)
}
pub fn get(self) -> u32 {
self.0
}