diff --git a/crates/egui/src/memory/mod.rs b/crates/egui/src/memory/mod.rs index 8d7476a2d9d..45b10dc8eba 100644 --- a/crates/egui/src/memory/mod.rs +++ b/crates/egui/src/memory/mod.rs @@ -20,7 +20,7 @@ pub use theme::{Theme, ThemePreference}; /// This includes window positions and sizes, /// how far the user has scrolled in a [`ScrollArea`](crate::ScrollArea) etc. /// -/// If you want this to persist when closing your app you should serialize [`Memory`] and store it. +/// If you want this to persist when closing your app, you should serialize [`Memory`] and store it. /// For this you need to enable the `persistence`. /// /// If you want to store data for your widgets, you should look at [`Memory::data`] @@ -33,13 +33,13 @@ pub struct Memory { /// This map stores some superficial state for all widgets with custom [`Id`]s. /// - /// This includes storing if a [`crate::CollapsingHeader`] is open, how far scrolled a + /// This includes storing whether a [`crate::CollapsingHeader`] is open, how far scrolled a /// [`crate::ScrollArea`] is, where the cursor in a [`crate::TextEdit`] is, etc. /// /// This is NOT meant to store any important data. Store that in your own structures! /// /// Each read clones the data, so keep your values cheap to clone. - /// If you want to store a lot of data you should wrap it in `Arc>` so it is cheap to clone. + /// If you want to store a lot of data, you should wrap it in `Arc>` so it is cheap to clone. /// /// This will be saved between different program runs if you use the `persistence` feature. /// @@ -49,8 +49,8 @@ pub struct Memory { // ------------------------------------------ /// Can be used to cache computations from one frame to another. /// - /// This is for saving CPU when you have something that may take 1-100ms to compute. - /// Things that are very slow (>100ms) should instead be done async (i.e. in another thread) + /// This is for saving CPU time when you have something that may take 1-100ms to compute. + /// Very slow operations (>100ms) should instead be done async (i.e. in another thread) /// so as not to lock the UI thread. /// /// ``` @@ -84,7 +84,7 @@ pub struct Memory { pub(crate) viewport_id: ViewportId, /// Which popup-window is open (if any)? - /// Could be a combo box, color picker, menu etc. + /// Could be a combo box, color picker, menu, etc. #[cfg_attr(feature = "persistence", serde(skip))] popup: Option, @@ -178,8 +178,8 @@ pub struct Options { #[cfg_attr(feature = "serde", serde(skip))] pub light_style: std::sync::Arc