WIP - Next: implement Element derive macro

This commit is contained in:
Nathan Sobo 2023-09-20 22:26:46 -06:00
parent 6d2b27689d
commit dfeb702544
21 changed files with 980 additions and 119 deletions

View file

@ -100,8 +100,8 @@ impl From<Size<Option<Pixels>>> for Size<Option<f32>> {
impl Size<Length> {
pub fn full() -> Self {
Self {
width: relative(1.),
height: relative(1.),
width: relative(1.).into(),
height: relative(1.).into(),
}
}
}
@ -410,7 +410,7 @@ impl Debug for Length {
}
}
pub fn relative<T: From<DefiniteLength>>(fraction: f32) -> T {
pub fn relative(fraction: f32) -> DefiniteLength {
DefiniteLength::Fraction(fraction).into()
}