Skip to content

Commit dd5ca1f

Browse files
committed
Fix test
1 parent 1735ff0 commit dd5ca1f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/style/size.rs

+13
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,19 @@ impl SizeDesc for u32 {
4545
}
4646
}
4747

48+
impl SizeDesc for f32 {
49+
fn in_pixels<D: HasDimension>(&self, _parent: &D) -> i32 {
50+
*self as i32
51+
}
52+
}
53+
54+
55+
impl SizeDesc for f64 {
56+
fn in_pixels<D: HasDimension>(&self, _parent: &D) -> i32 {
57+
*self as i32
58+
}
59+
}
60+
4861
/// Describes a relative size, might be
4962
/// 1. portion of height
5063
/// 2. portion of width

0 commit comments

Comments
 (0)