Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix small spelling mistakes (#38284)
Uwe Krausee14a4ab90daf
diff --git a/.rules b/.rulesindex 2f2b9cd705d..82d15eb9e88 100644--- a/.rules+++ b/.rules@@ -59,7 +59,7 @@ Trying to update an entity while it's already being updated must be avoided as tWhen `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.## Concurrencydiff --git a/crates/audio/src/audio.rs b/crates/audio/src/audio.rsindex ab8d85cdaa6..f60ddb87b96 100644--- a/crates/audio/src/audio.rs+++ b/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 = thisdiff --git a/crates/audio/src/rodio_ext.rs b/crates/audio/src/rodio_ext.rsindex ba4e4ff0554..e80b00e15a8 100644--- a/crates/audio/src/rodio_ext.rs+++ b/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 100msfn 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 sourcelet 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 sourcesource.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 seconddiff --git a/crates/cloud_llm_client/src/cloud_llm_client.rs b/crates/cloud_llm_client/src/cloud_llm_client.rsindex 16267d86d80..12ea6be1f33 100644--- a/crates/cloud_llm_client/src/cloud_llm_client.rs+++ b/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.diff --git a/crates/editor/src/editor_tests.rs b/crates/editor/src/editor_tests.rsindex 131b03c61b9..a8be7e020c0 100644--- a/crates/editor/src/editor_tests.rs+++ b/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("diff --git a/crates/gpui/src/platform/windows/platform.rs b/crates/gpui/src/platform/windows/platform.rsindex 4d0e6ea56f7..b1e2c123e88 100644--- a/crates/gpui/src/platform/windows/platform.rs+++ b/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));diff --git a/docs/src/development/glossary.md b/docs/src/development/glossary.mdindex d0ae12fe03a..b3ff24464c1 100644--- a/docs/src/development/glossary.md+++ b/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