From cff2e8bbe0828524147eefa6bb4af0fa2dd3a8a5 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 25 Jan 2024 18:32:32 +0100 Subject: [PATCH] Fix typos discovered by codespell --- crates/client/src/user.rs | 2 +- .../20231009181554_add_release_channel_to_rooms.sql | 2 +- crates/collab/src/db/tests/message_tests.rs | 2 +- crates/editor/src/element.rs | 2 +- crates/editor/src/inlay_hint_cache.rs | 12 ++++++------ crates/gpui/src/app.rs | 2 +- crates/gpui/src/elements/overlay.rs | 2 +- crates/language/src/language.rs | 2 +- crates/terminal_view/src/terminal_view.rs | 4 ++-- crates/theme/src/styles/colors.rs | 2 +- crates/theme_importer/README.md | 2 +- crates/zed/src/zed.rs | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/crates/client/src/user.rs b/crates/client/src/user.rs index 122046827a..e571d2dc15 100644 --- a/crates/client/src/user.rs +++ b/crates/client/src/user.rs @@ -287,7 +287,7 @@ impl UserStore { load_users.await?; // Users are fetched in parallel above and cached in call to get_users - // No need to paralellize here + // No need to parallelize here let mut updated_contacts = Vec::new(); let this = this .upgrade() diff --git a/crates/collab/migrations/20231009181554_add_release_channel_to_rooms.sql b/crates/collab/migrations/20231009181554_add_release_channel_to_rooms.sql index 8f3a704add..3f32ee35c5 100644 --- a/crates/collab/migrations/20231009181554_add_release_channel_to_rooms.sql +++ b/crates/collab/migrations/20231009181554_add_release_channel_to_rooms.sql @@ -1 +1 @@ -ALTER TABLE rooms ADD COLUMN enviroment TEXT; +ALTER TABLE rooms ADD COLUMN environment TEXT; diff --git a/crates/collab/src/db/tests/message_tests.rs b/crates/collab/src/db/tests/message_tests.rs index 10d9778612..190d2275d6 100644 --- a/crates/collab/src/db/tests/message_tests.rs +++ b/crates/collab/src/db/tests/message_tests.rs @@ -100,7 +100,7 @@ async fn test_channel_message_nonces(db: &Arc) { .await .unwrap(); - // As user A, create messages that re-use the same nonces. The requests + // As user A, create messages that reuse the same nonces. The requests // succeed, but return the same ids. let id1 = db .create_channel_message( diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index bcf2504d34..8a944c2cb4 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -3582,7 +3582,7 @@ mod tests { ); // multi-buffer support - // in DisplayPoint co-ordinates, this is what we're dealing with: + // in DisplayPoint coordinates, this is what we're dealing with: // 0: [[file // 1: header]] // 2: aaaaaa diff --git a/crates/editor/src/inlay_hint_cache.rs b/crates/editor/src/inlay_hint_cache.rs index 3fba722492..c4c18aefbf 100644 --- a/crates/editor/src/inlay_hint_cache.rs +++ b/crates/editor/src/inlay_hint_cache.rs @@ -1971,7 +1971,7 @@ pub mod tests { assert_eq!( lsp_request_count.load(Ordering::Relaxed), 3, - "Should query for new hints when they got reenabled" + "Should query for new hints when they got re-enabled" ); assert_eq!( vec![ @@ -1980,7 +1980,7 @@ pub mod tests { "type hint".to_string(), ], cached_hint_labels(editor), - "Should get its cached hints fully repopulated after the hints got reenabled" + "Should get its cached hints fully repopulated after the hints got re-enabled" ); assert_eq!( vec!["parameter hint".to_string()], @@ -1990,11 +1990,11 @@ pub mod tests { let inlay_cache = editor.inlay_hint_cache(); assert_eq!( inlay_cache.allowed_hint_kinds, final_allowed_hint_kinds, - "Cache should update editor settings when hints got reenabled" + "Cache should update editor settings when hints got re-enabled" ); assert_eq!( inlay_cache.version, edits_made, - "Cache should update its version after hints got reenabled" + "Cache should update its version after hints got re-enabled" ); }); @@ -2736,7 +2736,7 @@ pub mod tests { assert_eq!(expected_hints, cached_hint_labels(editor), "After multibuffer was scrolled to the end, further scrolls up should not bring more hints"); assert_eq!(expected_hints, visible_hint_labels(editor, cx)); - assert_eq!(editor.inlay_hint_cache().version, last_scroll_update_version, "No updates should happen during scrolling already scolled buffer"); + assert_eq!(editor.inlay_hint_cache().version, last_scroll_update_version, "No updates should happen during scrolling already scrolled buffer"); }); editor_edited.store(true, Ordering::Release); @@ -2762,7 +2762,7 @@ pub mod tests { assert_eq!( expected_hints, cached_hint_labels(editor), - "After multibuffer edit, editor gets scolled back to the last selection; \ + "After multibuffer edit, editor gets scrolled back to the last selection; \ all hints should be invalidated and required for all of its visible excerpts" ); assert_eq!(expected_hints, visible_hint_labels(editor, cx)); diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs index 6f75eafaf2..57f2254ef2 100644 --- a/crates/gpui/src/app.rs +++ b/crates/gpui/src/app.rs @@ -574,7 +574,7 @@ impl AppContext { } /// Displays a platform modal for selecting a new path where a file can be saved. - /// The provided directory will be used to set the iniital location. + /// The provided directory will be used to set the initial location. /// When a path is selected, it is relayed asynchronously via the returned oneshot channel. /// If cancelled, a `None` will be relayed instead. pub fn prompt_for_new_path(&self, directory: &Path) -> oneshot::Receiver> { diff --git a/crates/gpui/src/elements/overlay.rs b/crates/gpui/src/elements/overlay.rs index 9db75b75ba..ed23205ae7 100644 --- a/crates/gpui/src/elements/overlay.rs +++ b/crates/gpui/src/elements/overlay.rs @@ -40,7 +40,7 @@ impl Overlay { self } - /// Sets the position in window co-ordinates + /// Sets the position in window coordinates /// (otherwise the location the overlay is rendered is used) pub fn position(mut self, anchor: Point) -> Self { self.anchor_position = Some(anchor); diff --git a/crates/language/src/language.rs b/crates/language/src/language.rs index 1add9c7c25..9e2e7a0b66 100644 --- a/crates/language/src/language.rs +++ b/crates/language/src/language.rs @@ -584,7 +584,7 @@ impl<'de> Deserialize<'de> for BracketPairConfig { } /// Describes a single bracket pair and how an editor should react to e.g. inserting -/// an opening bracket or to a newline character insertion inbetween `start` and `end` characters. +/// an opening bracket or to a newline character insertion in between `start` and `end` characters. #[derive(Clone, Debug, Default, Deserialize, PartialEq)] pub struct BracketPair { /// Starting substring for a bracket. diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rs index 180667b113..c0074cf53a 100644 --- a/crates/terminal_view/src/terminal_view.rs +++ b/crates/terminal_view/src/terminal_view.rs @@ -911,7 +911,7 @@ impl SearchableItem for TerminalView { } } -///Get's the working directory for the given workspace, respecting the user's settings. +///Gets the working directory for the given workspace, respecting the user's settings. pub fn get_working_directory( workspace: &Workspace, cx: &AppContext, @@ -932,7 +932,7 @@ pub fn get_working_directory( res.or_else(home_dir) } -///Get's the first project's home directory, or the home directory +///Gets the first project's home directory, or the home directory fn first_project_directory(workspace: &Workspace, cx: &AppContext) -> Option { workspace .worktrees(cx) diff --git a/crates/theme/src/styles/colors.rs b/crates/theme/src/styles/colors.rs index b830d19fee..17910ef973 100644 --- a/crates/theme/src/styles/colors.rs +++ b/crates/theme/src/styles/colors.rs @@ -236,7 +236,7 @@ pub struct ThemeColors { #[derive(Refineable, Clone)] pub struct ThemeStyles { pub system: SystemColors, - /// An array of colors used for theme elements that iterrate through a series of colors. + /// An array of colors used for theme elements that iterate through a series of colors. /// /// Example: Player colors, rainbow brackets and indent guides, etc. pub accents: Vec, diff --git a/crates/theme_importer/README.md b/crates/theme_importer/README.md index a610d694d7..9373b54ae1 100644 --- a/crates/theme_importer/README.md +++ b/crates/theme_importer/README.md @@ -66,7 +66,7 @@ Copy that json file into the theme family directory and tidy up the filenames as A LICENSE file is required to import a theme family. Failing to provide a complete text license will cause it to be skipped when the import is run. -If the theme only provices a license code (e.g. MIT, Apache 2.0, etc.) then put that code into the LICENSE file. +If the theme only provides a license code (e.g. MIT, Apache 2.0, etc.) then put that code into the LICENSE file. If no license is provided, either contact the theme creator or don't add the theme. diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index f6f513a4b3..bf001dac72 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -143,7 +143,7 @@ pub fn initialize_workspace(app_state: Arc, cx: &mut AppContext) { cx.on_window_should_close(move |cx| { handle .update(cx, |workspace, cx| { - // We'll handle closing asynchoronously + // We'll handle closing asynchronously workspace.close_window(&Default::default(), cx); false })