diff --git a/core/src/orientation/align.rs b/core/src/orientation/align.rs index 6a10cc6..605fcc8 100644 --- a/core/src/orientation/align.rs +++ b/core/src/orientation/align.rs @@ -84,14 +84,6 @@ pub struct RegionAlign { pub y: AxisAlign, } -impl RegionAlign { - /// Both axes at the near edge: the start of a box in its own orientation. - pub const NEAR: Self = Self { - x: AxisAlign::NEG, - y: AxisAlign::NEG, - }; -} - impl RegionAlign { pub const TOP_LEFT: Self = Self::new(AxisAlign::NEG, AxisAlign::NEG); pub const TOP_CENTER: Self = Self::new(AxisAlign::CENTER, AxisAlign::NEG); diff --git a/core/src/orientation/axis.rs b/core/src/orientation/axis.rs index 359aea1..3cdef73 100644 --- a/core/src/orientation/axis.rs +++ b/core/src/orientation/axis.rs @@ -11,15 +11,6 @@ pub enum Axis { impl Axis { /// Both of them, for the layout code that asks the same question of each. pub const BOTH: [Self; 2] = [Self::X, Self::Y]; - - /// A per-axis pair with `aligned` on this axis and `ortho` on the other, - /// which is what `from_axis` does for a vector. - pub fn pair(self, aligned: T, ortho: T) -> [T; 2] { - match self { - Self::X => [aligned, ortho], - Self::Y => [ortho, aligned], - } - } } impl std::ops::Not for Axis { diff --git a/core/src/ui/holds.rs b/core/src/ui/holds.rs index a9791f8..68a8818 100644 --- a/core/src/ui/holds.rs +++ b/core/src/ui/holds.rs @@ -29,7 +29,7 @@ impl Holds { Self { lo: len, hi: len } } - pub const fn contains(&self, len: Px) -> bool { + pub const fn contains(self, len: Px) -> bool { len.raw() >= self.lo.raw() && len.raw() <= self.hi.raw() } diff --git a/src/widget/position/span.rs b/src/widget/position/span.rs index 9b54abb..561d8be 100644 --- a/src/widget/position/span.rs +++ b/src/widget/position/span.rs @@ -124,7 +124,7 @@ impl Widget for Span { if shrinks { // Choosing between a fixed and a relative length from the // span's own eventual width admits multiple fixed points. - // A scalable child therefore makes Children scalable too; + // A scalable child therefore makes the span scalable too; // only fixed children are compared with one another. if !used.is_px() { ortho = LayoutLen::LEFTOVER;