From c0b14f4d4e7ec5a99ed0246e541a5c6a49eea7aa Mon Sep 17 00:00:00 2001 From: Rinde van Lon Date: Fri, 10 Nov 2023 12:11:48 +0000 Subject: [PATCH] fix-inconsistent-naming (#3438) --- crates/egui/src/containers/area.rs | 2 +- crates/egui/src/containers/window.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/egui/src/containers/area.rs b/crates/egui/src/containers/area.rs index 52c02b18ba0..4f603717ec1 100644 --- a/crates/egui/src/containers/area.rs +++ b/crates/egui/src/containers/area.rs @@ -155,7 +155,7 @@ impl Area { self } - /// Constraint the movement of the window to the given rectangle. + /// Constrain the movement of the window to the given rectangle. /// /// For instance: `.constrain_to(ctx.screen_rect())`. pub fn constrain_to(mut self, constrain_rect: Rect) -> Self { diff --git a/crates/egui/src/containers/window.rs b/crates/egui/src/containers/window.rs index 6c385bbff39..afc9f48d37b 100644 --- a/crates/egui/src/containers/window.rs +++ b/crates/egui/src/containers/window.rs @@ -147,7 +147,7 @@ impl<'open> Window<'open> { /// Constrains this window to the screen bounds. /// - /// To change the area to constrain to, use [`Self::constraint_to`]. + /// To change the area to constrain to, use [`Self::constrain_to`]. /// /// Default: `true`. pub fn constrain(mut self, constrain: bool) -> Self { @@ -155,10 +155,10 @@ impl<'open> Window<'open> { self } - /// Constraint the movement of the window to the given rectangle. + /// Constrain the movement of the window to the given rectangle. /// /// For instance: `.constrain_to(ctx.screen_rect())`. - pub fn constraint_to(mut self, constrain_rect: Rect) -> Self { + pub fn constrain_to(mut self, constrain_rect: Rect) -> Self { self.area = self.area.constrain_to(constrain_rect); self }