From cff2e8bbe0828524147eefa6bb4af0fa2dd3a8a5 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 25 Jan 2024 18:32:32 +0100 Subject: [PATCH 1/2] 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 122046827ac60273e689528b659c482ba74d04ef..e571d2dc1528a2dcac5b42917e01e941f3fb44ef 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 8f3a704adde0c385b26bd553d273eff322a17702..3f32ee35c59107e12fda98159911dbba6e13434a 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 10d9778612f4d6a66410ee1e77b4d04ff0b5a771..190d2275d6261a5a36230b01782a70d9cefd1909 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 bcf2504d341be65d1ec84a16b85027cb08f2be14..8a944c2cb400bb79b868801148d8d0f1510e33c7 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 3fba722492674e84baf5ca114456876ced063071..c4c18aefbf349165c36a481b42ea7e447dbac5c3 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 6f75eafaf2a898ecc7d33a4d96365a42e41e712f..57f2254ef29b134f9331427c6030bcee74e412b4 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 9db75b75ba0d8138d75fd4a9aa90071e15689a10..ed23205ae71324086823a6345f3c07a187f0a08e 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 1add9c7c25ae6561ec25461066c87a8b83c1d662..9e2e7a0b66d5a27873e77692920e77d75b4c2199 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 180667b113816f0928a23882fb40222824136bbc..c0074cf53ad752f58e1e3e33ed2d2cef2cc489ac 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 b830d19fee1faeaa6ce01b79850a72277a309a01..17910ef973f417ec7e757e86c3cf4f945986f3b5 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 a610d694d707d355c223c79b9581c21ab13072ce..9373b54ae19df6b637ff14632f0f2ad72ad3fe27 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 f6f513a4b386479ce801e9ea79fc73aa47d1fd8f..bf001dac72e1fd733523e0b6304b5541a0e3aa64 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 }) From 3d898c562eed75ddb1cb9d6970d149b91a77a4dd Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Thu, 25 Jan 2024 10:50:59 -0800 Subject: [PATCH 2/2] Update crates/collab/migrations/20231009181554_add_release_channel_to_rooms.sql Co-authored-by: Christian Clauss --- .../migrations/20231009181554_add_release_channel_to_rooms.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3f32ee35c59107e12fda98159911dbba6e13434a..8f3a704adde0c385b26bd553d273eff322a17702 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 environment TEXT; +ALTER TABLE rooms ADD COLUMN enviroment TEXT;