From 3bb33980a93547c41898a2f0ba294843adaacea7 Mon Sep 17 00:00:00 2001 From: hardlydearly <167623323+hardlydearly@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:33:29 +0800 Subject: [PATCH] chore: remove repetitive words (#4400) remove repetitive words Signed-off-by: hardlydearly <799511800@qq.com> --- crates/egui/src/callstack.rs | 2 +- crates/egui/src/containers/frame.rs | 2 +- crates/egui/src/context.rs | 4 ++-- crates/egui/src/memory.rs | 4 ++-- crates/egui/src/text_selection/cursor_range.rs | 2 +- crates/egui/src/text_selection/text_cursor_state.rs | 2 +- crates/egui/src/ui.rs | 4 ++-- crates/egui/src/viewport.rs | 4 ++-- crates/egui/src/widgets/text_edit/state.rs | 2 +- crates/epaint/src/tessellator.rs | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/crates/egui/src/callstack.rs b/crates/egui/src/callstack.rs index fac5ac593..aa6f44cb0 100644 --- a/crates/egui/src/callstack.rs +++ b/crates/egui/src/callstack.rs @@ -77,7 +77,7 @@ pub fn capture() -> String { // Remove stuff that isn't user calls: let skip_prefixes = [ - // "backtrace::", // not needed, since we cut at at egui::callstack::capture + // "backtrace::", // not needed, since we cut at egui::callstack::capture "egui::", "", diff --git a/crates/egui/src/containers/frame.rs b/crates/egui/src/containers/frame.rs index 82ef47770..40bd17d3c 100644 --- a/crates/egui/src/containers/frame.rs +++ b/crates/egui/src/containers/frame.rs @@ -306,7 +306,7 @@ impl Prepared { self.content_ui.min_rect() + self.frame.inner_margin + self.frame.outer_margin } - /// Allocate the the space that was used by [`Self::content_ui`]. + /// Allocate the space that was used by [`Self::content_ui`]. /// /// This MUST be called, or the parent ui will not know how much space this widget used. /// diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index 192b0cc49..f697fb4b8 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -257,7 +257,7 @@ pub struct RepaintCause { /// What file had the call that requested the repaint? pub file: &'static str, - /// What line number of the the call that requested the repaint? + /// What line number of the call that requested the repaint? pub line: u32, } @@ -924,7 +924,7 @@ impl Context { self.write(move |ctx| writer(&mut ctx.memory.options.tessellation_options)) } - /// If the given [`Id`] has been used previously the same frame at at different position, + /// If the given [`Id`] has been used previously the same frame at different position, /// then an error will be printed on screen. /// /// This function is already called for all widgets that do any interaction, diff --git a/crates/egui/src/memory.rs b/crates/egui/src/memory.rs index 2ef8bbf58..4bee395c5 100644 --- a/crates/egui/src/memory.rs +++ b/crates/egui/src/memory.rs @@ -132,7 +132,7 @@ enum FocusDirection { /// Select the widget below the current focused widget. Down, - /// Select the widget to the left of the the current focused widget. + /// Select the widget to the left of the current focused widget. Left, /// Select the previous widget that had focus. @@ -812,7 +812,7 @@ impl Memory { /// ## Popups /// Popups are things like combo-boxes, color pickers, menus etc. -/// Only one can be be open at a time. +/// Only one can be open at a time. impl Memory { /// Is the given popup open? pub fn is_popup_open(&self, popup_id: Id) -> bool { diff --git a/crates/egui/src/text_selection/cursor_range.rs b/crates/egui/src/text_selection/cursor_range.rs index cebcf3fb5..cf17a2e9b 100644 --- a/crates/egui/src/text_selection/cursor_range.rs +++ b/crates/egui/src/text_selection/cursor_range.rs @@ -63,7 +63,7 @@ impl CursorRange { self.primary.ccursor == self.secondary.ccursor } - /// Is `self` a super-set of the the other range? + /// Is `self` a super-set of the other range? pub fn contains(&self, other: &Self) -> bool { let [self_min, self_max] = self.sorted_cursors(); let [other_min, other_max] = other.sorted_cursors(); diff --git a/crates/egui/src/text_selection/text_cursor_state.rs b/crates/egui/src/text_selection/text_cursor_state.rs index 7aca96f8b..bd596e7e8 100644 --- a/crates/egui/src/text_selection/text_cursor_state.rs +++ b/crates/egui/src/text_selection/text_cursor_state.rs @@ -46,7 +46,7 @@ impl TextCursorState { self.cursor_range.is_none() && self.ccursor_range.is_none() } - /// The the currently selected range of characters. + /// The currently selected range of characters. pub fn char_range(&self) -> Option { self.ccursor_range.or_else(|| { self.cursor_range diff --git a/crates/egui/src/ui.rs b/crates/egui/src/ui.rs index d160f5d40..1215d0eeb 100644 --- a/crates/egui/src/ui.rs +++ b/crates/egui/src/ui.rs @@ -1886,7 +1886,7 @@ impl Ui { /// adjusted up and down to lie in the center of the horizontal layout. /// The initial height is `style.spacing.interact_size.y`. /// Centering is almost always what you want if you are - /// planning to to mix widgets or use different types of text. + /// planning to mix widgets or use different types of text. /// /// If you don't want the contents to be centered, use [`Self::horizontal_top`] instead. /// @@ -1947,7 +1947,7 @@ impl Ui { /// adjusted up and down to lie in the center of the horizontal layout. /// The initial height is `style.spacing.interact_size.y`. /// Centering is almost always what you want if you are - /// planning to to mix widgets or use different types of text. + /// planning to mix widgets or use different types of text. /// /// The returned [`Response`] will only have checked for mouse hover /// but can be used for tooltips (`on_hover_text`). diff --git a/crates/egui/src/viewport.rs b/crates/egui/src/viewport.rs index e1e3ebf0e..cce904877 100644 --- a/crates/egui/src/viewport.rs +++ b/crates/egui/src/viewport.rs @@ -889,7 +889,7 @@ pub enum X11WindowType { /// This property is typically used on override-redirect windows. Combo, - /// This indicates the the window is being dragged. + /// This indicates the window is being dragged. /// This property is typically used on override-redirect windows. Dnd, } @@ -1015,7 +1015,7 @@ pub enum ViewportCommand { /// Set window to be always-on-top, always-on-bottom, or neither. WindowLevel(WindowLevel), - /// The the window icon. + /// The window icon. Icon(Option>), /// Set the IME cursor editing area. diff --git a/crates/egui/src/widgets/text_edit/state.rs b/crates/egui/src/widgets/text_edit/state.rs index ef4a8909a..c95d67691 100644 --- a/crates/egui/src/widgets/text_edit/state.rs +++ b/crates/egui/src/widgets/text_edit/state.rs @@ -67,7 +67,7 @@ impl TextEditState { ctx.data_mut(|d| d.insert_persisted(id, self)); } - /// The the currently selected range of characters. + /// The currently selected range of characters. #[deprecated = "Use `self.cursor.char_range` instead"] pub fn ccursor_range(&self) -> Option { self.cursor.char_range() diff --git a/crates/epaint/src/tessellator.rs b/crates/epaint/src/tessellator.rs index c7dc31b75..4135cc58d 100644 --- a/crates/epaint/src/tessellator.rs +++ b/crates/epaint/src/tessellator.rs @@ -653,7 +653,7 @@ pub struct TessellationOptions { /// Default: `true`. pub feathering: bool, - /// The size of the the feathering, in physical pixels. + /// The size of the feathering, in physical pixels. /// /// The default, and suggested, value for this is `1.0`. /// If you use a larger value, edges will appear blurry.