Fix small spelling mistakes (#38284)

Uwe Krause created

Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Change summary

.rules                                          |  2 +-
crates/audio/src/audio.rs                       |  2 +-
crates/audio/src/rodio_ext.rs                   | 12 ++++++------
crates/cloud_llm_client/src/cloud_llm_client.rs |  2 +-
crates/editor/src/editor_tests.rs               |  2 +-
crates/gpui/src/platform/windows/platform.rs    |  2 +-
docs/src/development/glossary.md                |  4 ++--
7 files changed, 13 insertions(+), 13 deletions(-)

Detailed changes

.rules 🔗

@@ -59,7 +59,7 @@ Trying to update an entity while it's already being updated must be avoided as t
 
 When  `read_with`, `update`, or `update_in` are used with an async context, the closure's return value is wrapped in an `anyhow::Result`.
 
-`WeakEntity<T>` is a weak handle. It has `read_with`, `update`, and `update_in` methods that work the same, but always return an `anyhow::Result` so that they can fail if the entity no longer exists. This can be useful to avoid memory leaks - if entities have mutually recursive handles to eachother they will never be dropped.
+`WeakEntity<T>` is a weak handle. It has `read_with`, `update`, and `update_in` methods that work the same, but always return an `anyhow::Result` so that they can fail if the entity no longer exists. This can be useful to avoid memory leaks - if entities have mutually recursive handles to each other they will never be dropped.
 
 ## Concurrency
 

crates/audio/src/audio.rs 🔗

@@ -211,7 +211,7 @@ impl Audio {
                 agc_source.set_enabled(LIVE_SETTINGS.control_input_volume.load(Ordering::Relaxed));
             })
             .replayable(REPLAY_DURATION)
-            .expect("REPLAY_DURATION is longer then 100ms");
+            .expect("REPLAY_DURATION is longer than 100ms");
 
         cx.update_default_global(|this: &mut Self, _cx| {
             let output_mixer = this

crates/audio/src/rodio_ext.rs 🔗

@@ -57,7 +57,7 @@ impl<S: Source> RodioExt for S {
     /// replay is being read
     ///
     /// # Errors
-    /// If duration is smaller then 100ms
+    /// If duration is smaller than 100ms
     fn replayable(
         self,
         duration: Duration,
@@ -151,7 +151,7 @@ impl<S: Source> Source for TakeSamples<S> {
 struct ReplayQueue {
     inner: ArrayQueue<Vec<Sample>>,
     normal_chunk_len: usize,
-    /// The last chunk in the queue may be smaller then
+    /// The last chunk in the queue may be smaller than
     /// the normal chunk size. This is always equal to the
     /// size of the last element in the queue.
     /// (so normally chunk_size)
@@ -535,7 +535,7 @@ mod tests {
 
             let (mut replay, mut source) = input
                 .replayable(Duration::from_secs(3))
-                .expect("longer then 100ms");
+                .expect("longer than 100ms");
 
             source.by_ref().take(3).count();
             let yielded: Vec<Sample> = replay.by_ref().take(3).collect();
@@ -552,7 +552,7 @@ mod tests {
 
             let (mut replay, mut source) = input
                 .replayable(Duration::from_secs(2))
-                .expect("longer then 100ms");
+                .expect("longer than 100ms");
 
             source.by_ref().take(5).count(); // get all items but do not end the source
             let yielded: Vec<Sample> = replay.by_ref().take(2).collect();
@@ -567,7 +567,7 @@ mod tests {
 
             let (replay, mut source) = input
                 .replayable(Duration::from_secs(2))
-                .expect("longer then 100ms");
+                .expect("longer than 100ms");
 
             // exhaust but do not yet end source
             source.by_ref().take(40_000).count();
@@ -586,7 +586,7 @@ mod tests {
             let input = StaticSamplesBuffer::new(nz!(1), nz!(16_000), &[0.0; 40_000]);
             let (mut replay, source) = input
                 .replayable(Duration::from_secs(2))
-                .expect("longer then 100ms");
+                .expect("longer than 100ms");
             assert_eq!(replay.by_ref().samples_ready(), 0);
 
             source.take(8000).count(); // half a second

crates/cloud_llm_client/src/cloud_llm_client.rs 🔗

@@ -39,7 +39,7 @@ pub const EDIT_PREDICTIONS_RESOURCE_HEADER_VALUE: &str = "edit_predictions";
 /// The name of the header used to indicate that the maximum number of consecutive tool uses has been reached.
 pub const TOOL_USE_LIMIT_REACHED_HEADER_NAME: &str = "x-zed-tool-use-limit-reached";
 
-/// The name of the header used to indicate the the minimum required Zed version.
+/// The name of the header used to indicate the minimum required Zed version.
 ///
 /// This can be used to force a Zed upgrade in order to continue communicating
 /// with the LLM service.

crates/editor/src/editor_tests.rs 🔗

@@ -19265,7 +19265,7 @@ async fn test_expand_diff_hunk_at_excerpt_boundary(cx: &mut TestAppContext) {
     cx.executor().run_until_parked();
 
     // When the start of a hunk coincides with the start of its excerpt,
-    // the hunk is expanded. When the start of a a hunk is earlier than
+    // the hunk is expanded. When the start of a hunk is earlier than
     // the start of its excerpt, the hunk is not expanded.
     cx.assert_state_with_diff(
         "

crates/gpui/src/platform/windows/platform.rs 🔗

@@ -1016,7 +1016,7 @@ fn handle_gpu_device_lost(
     all_windows: &std::sync::Weak<RwLock<SmallVec<[SafeHwnd; 4]>>>,
     text_system: &std::sync::Weak<DirectWriteTextSystem>,
 ) {
-    // Here we wait a bit to ensure the the system has time to recover from the device lost state.
+    // Here we wait a bit to ensure the system has time to recover from the device lost state.
     // If we don't wait, the final drawing result will be blank.
     std::thread::sleep(std::time::Duration::from_millis(350));
 

docs/src/development/glossary.md 🔗

@@ -23,7 +23,7 @@ here. An example would be `AnyElement` and `LspStore`.
 
 ## GPUI
 
-### State menagement
+### State management
 
 - `App`: A singleton which holds the full application state including all the entities. Crucially: `App` is not `Send`, which means that `App` only exists on the thread that created it (which is the main/UI thread, usually). Thus, if you see a `&mut App`, know that you're on UI thread.
 - `Context`: A wrapper around the `App` struct with specialized behavior for a specific `Entity`. Think of it as `(&mut App, Entity<V>)`. The specialized behavior is surfaced in the API surface of `Context`. E.g., `App::spawn` takes an `AsyncFnOnce(AsyncApp) -> Ret`, whereas `Context::spawn` takes an `AsyncFnOnce(WeakEntity<V>, AsyncApp) -> Ret`.
@@ -67,7 +67,7 @@ h_flex()
 - `Component`: A builder which can be rendered turning it into an `Element`.
 - `Dispatch tree`: TODO
 - `Focus`: The place where keystrokes are handled first
-- `Focus tree`: Path from the place thats the current focus to the UI Root. Example <img> TODO
+- `Focus tree`: Path from the place that has the current focus to the UI Root. Example <img> TODO
 
 ## Zed UI