From d3065fc2f2dfa77fbc0297e2c67cb7becf0e5462 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Sat, 22 Jun 2024 22:05:31 +0100 Subject: [PATCH] doc: add "top_left" as alias for "left_top", etc. Extremely minor annoyance, but I keep getting confused by this as "top left" is much more natural in english. --- crates/emath/src/rect.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/emath/src/rect.rs b/crates/emath/src/rect.rs index 23d0428ac0a..74241c05e5a 100644 --- a/crates/emath/src/rect.rs +++ b/crates/emath/src/rect.rs @@ -542,6 +542,7 @@ impl Rect { } #[inline(always)] + #[doc(alias = "top_left")] pub fn left_top(&self) -> Pos2 { pos2(self.left(), self.top()) } @@ -552,6 +553,7 @@ impl Rect { } #[inline(always)] + #[doc(alias = "top_right")] pub fn right_top(&self) -> Pos2 { pos2(self.right(), self.top()) } @@ -567,6 +569,7 @@ impl Rect { } #[inline(always)] + #[doc(alias = "bottom_left")] pub fn left_bottom(&self) -> Pos2 { pos2(self.left(), self.bottom()) } @@ -577,6 +580,7 @@ impl Rect { } #[inline(always)] + #[doc(alias = "bottom_right")] pub fn right_bottom(&self) -> Pos2 { pos2(self.right(), self.bottom()) }