From 5d6a58b9176c2ae807928293da8a4e68f1c70d13 Mon Sep 17 00:00:00 2001 From: lucasmerlin Date: Mon, 4 Nov 2024 09:51:34 +0100 Subject: [PATCH] Fix some typos (#5339) The spell check pipeline in #5313 suddenly failed, this fixes these typos and some more found via my IDEs spell checker tool --- crates/eframe/src/web/events.rs | 2 +- crates/eframe/src/web/web_runner.rs | 2 +- crates/egui/src/containers/window.rs | 2 +- crates/egui/src/ui_builder.rs | 2 +- crates/egui/src/util/cache.rs | 4 ++-- crates/egui/src/viewport.rs | 2 +- crates/epaint/src/tessellator.rs | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/eframe/src/web/events.rs b/crates/eframe/src/web/events.rs index cdecf3b701e..414e5be2383 100644 --- a/crates/eframe/src/web/events.rs +++ b/crates/eframe/src/web/events.rs @@ -6,7 +6,7 @@ use super::{ }; use web_sys::EventTarget; -// TODO(emilk): there are more calls to `prevent_default` and `stop_propagaton` +// TODO(emilk): there are more calls to `prevent_default` and `stop_propagation` // than what is probably needed. // ------------------------------------------------------------------------ diff --git a/crates/eframe/src/web/web_runner.rs b/crates/eframe/src/web/web_runner.rs index a2793a13aeb..46efa09bb33 100644 --- a/crates/eframe/src/web/web_runner.rs +++ b/crates/eframe/src/web/web_runner.rs @@ -6,7 +6,7 @@ use crate::{epi, App}; use super::{events, text_agent::TextAgent, AppRunner, PanicHandler}; -/// This is how `eframe` runs your wepp application +/// This is how `eframe` runs your web application /// /// This is cheap to clone. /// diff --git a/crates/egui/src/containers/window.rs b/crates/egui/src/containers/window.rs index 9b5de167df4..e2d133f39ad 100644 --- a/crates/egui/src/containers/window.rs +++ b/crates/egui/src/containers/window.rs @@ -730,7 +730,7 @@ struct ResizeInteraction { bottom: SideResponse, } -/// A minitature version of `Response`, for each side of the window. +/// A miniature version of `Response`, for each side of the window. #[derive(Clone, Copy, Debug, Default)] struct SideResponse { hover: bool, diff --git a/crates/egui/src/ui_builder.rs b/crates/egui/src/ui_builder.rs index e1075a9e674..d13748543ab 100644 --- a/crates/egui/src/ui_builder.rs +++ b/crates/egui/src/ui_builder.rs @@ -5,7 +5,7 @@ use crate::{Id, LayerId, Layout, Rect, Sense, Style, UiStackInfo}; #[allow(unused_imports)] // Used for doclinks use crate::Ui; -/// Build a [`Ui`] as the chlild of another [`Ui`]. +/// Build a [`Ui`] as the child of another [`Ui`]. /// /// By default, everything is inherited from the parent, /// except for `max_rect` which by default is set to diff --git a/crates/egui/src/util/cache.rs b/crates/egui/src/util/cache.rs index 52b3bd57357..14ec9a7b6a2 100644 --- a/crates/egui/src/util/cache.rs +++ b/crates/egui/src/util/cache.rs @@ -39,7 +39,7 @@ impl FrameCache { } /// Must be called once per frame to clear the cache. - pub fn evice_cache(&mut self) { + pub fn evict_cache(&mut self) { let current_generation = self.generation; self.cache.retain(|_key, cached| { cached.0 == current_generation // only keep those that were used this frame @@ -89,7 +89,7 @@ impl CacheTrait for FrameCache { fn update(&mut self) { - self.evice_cache(); + self.evict_cache(); } fn len(&self) -> usize { diff --git a/crates/egui/src/viewport.rs b/crates/egui/src/viewport.rs index 76131ec9fb9..31cbc623e39 100644 --- a/crates/egui/src/viewport.rs +++ b/crates/egui/src/viewport.rs @@ -19,7 +19,7 @@ //! ### Deferred viewports //! These are created with [`Context::show_viewport_deferred`]. //! Deferred viewports take a closure that is called by the integration at a later time, perhaps multiple times. -//! Deferred viewports are repainted independenantly of the parent viewport. +//! Deferred viewports are repainted independently of the parent viewport. //! This means communication with them needs to be done via channels, or `Arc/Mutex`. //! //! This is the most performant type of child viewport, though a bit more cumbersome to work with compared to immediate viewports. diff --git a/crates/epaint/src/tessellator.rs b/crates/epaint/src/tessellator.rs index 0c15b7dba09..fdbe270914e 100644 --- a/crates/epaint/src/tessellator.rs +++ b/crates/epaint/src/tessellator.rs @@ -2029,8 +2029,8 @@ impl Tessellator { use rayon::prelude::*; // We only parallelize large/slow stuff, because each tessellation job - // will allocate a new Mesh, and so it creates a lot of extra memory framentation - // and callocations that is only worth it for large shapes. + // will allocate a new Mesh, and so it creates a lot of extra memory fragmentation + // and allocations that is only worth it for large shapes. fn should_parallelize(shape: &Shape) -> bool { match shape { Shape::Vec(shapes) => 4 < shapes.len() || shapes.iter().any(should_parallelize),