diff --git a/app/initializers/hashchange.js b/app/initializers/hashchange.js index 67f30229c40..f96a185f8d9 100644 --- a/app/initializers/hashchange.js +++ b/app/initializers/hashchange.js @@ -14,7 +14,7 @@ function findElementByFragmentName(document, name) { try { return document.querySelector(`#${name}`) || document.getElementsByName(name)[0]; } catch { - // Catches execptions thrown when an anchor in a readme was invalid (see issue #3108) + // Catches exceptions thrown when an anchor in a readme was invalid (see issue #3108) return; } } diff --git a/src/bin/background-worker.rs b/src/bin/background-worker.rs index 4bf286267fb..272779d7b89 100644 --- a/src/bin/background-worker.rs +++ b/src/bin/background-worker.rs @@ -5,7 +5,7 @@ //! are unable to spawn workers to run jobs (either because we couldn't connect //! to the DB, an error occurred while loading, or we just never heard back from //! the worker thread), we will rebuild the runner and try again up to 5 times. -//! After the 5th occurrance, we will panic. +//! After the 5th occurrence, we will panic. //! //! Usage: //! cargo run --bin background-worker diff --git a/src/controllers/version/metadata.rs b/src/controllers/version/metadata.rs index f305245ec59..e53d72161e0 100644 --- a/src/controllers/version/metadata.rs +++ b/src/controllers/version/metadata.rs @@ -1,6 +1,6 @@ //! Endpoints that expose metadata about crate versions //! -//! These endpoints provide data that could be obtained direclty from the +//! These endpoints provide data that could be obtained directly from the //! index or cached metadata which was extracted (client side) from the //! `Cargo.toml` file. @@ -13,7 +13,7 @@ use super::{extract_crate_name_and_semver, version_and_crate}; /// Handles the `GET /crates/:crate_id/:version/dependencies` route. /// -/// This information can be obtained direclty from the index. +/// This information can be obtained directly from the index. /// /// In addition to returning cached data from the index, this returns /// fields for `id`, `version_id`, and `downloads` (which appears to always diff --git a/src/downloads_counter.rs b/src/downloads_counter.rs index 9ff203ad9bb..1a54332c295 100644 --- a/src/downloads_counter.rs +++ b/src/downloads_counter.rs @@ -12,7 +12,7 @@ use std::sync::atomic::{AtomicI64, AtomicUsize, Ordering}; /// To avoid locking the whole data structure behind a RwLock, which could potentially delay /// requests, this uses the dashmap crate. A DashMap has the same public API as an HashMap, but /// stores the items into `num_cpus()*4` individually locked shards. This approach reduces the -/// likelyhood of a request encountering a locked shard. +/// likelihood of a request encountering a locked shard. /// /// Persisting the download counts in the database also takes advantage of the inner sharding of /// DashMaps: to avoid locking all the download requests at the same time each iteration only @@ -124,7 +124,7 @@ impl DownloadsCounter { // as we'd lose the downloads from the aborted transaction. // // Ensuring the rows are inserted in a consistent order (in our case by sorting them by - // the version ID) will prevent deadlocks from occuring. For more information: + // the version ID) will prevent deadlocks from occurring. For more information: // // https://www.postgresql.org/docs/11/explicit-locking.html#LOCKING-DEADLOCKS // diff --git a/src/tests/krate/search.rs b/src/tests/krate/search.rs index 4e46255f678..6401a83a23e 100644 --- a/src/tests/krate/search.rs +++ b/src/tests/krate/search.rs @@ -622,7 +622,7 @@ fn test_zero_downloads() { /* Given two crates, one with more all-time downloads, the other with more downloads in the past 90 days, check that the index page for - categories and keywords is sorted by recent downlaods by default. + categories and keywords is sorted by recent downloads by default. */ #[test] fn test_default_sort_recent() { diff --git a/src/tests/owners.rs b/src/tests/owners.rs index a12412b54b5..d29252257c3 100644 --- a/src/tests/owners.rs +++ b/src/tests/owners.rs @@ -198,7 +198,7 @@ fn owners_can_remove_self() { json!({ "msg": "owners successfully removed", "ok": true }) ); - // After you delete yourself, you no longer have permisions to manage the crate. + // After you delete yourself, you no longer have permissions to manage the crate. let response = token.remove_named_owner("owners_selfremove", username); assert_eq!(response.status(), StatusCode::OK); assert_eq!( diff --git a/src/tests/team.rs b/src/tests/team.rs index 124153686bb..a7ba9f5fc8e 100644 --- a/src/tests/team.rs +++ b/src/tests/team.rs @@ -352,7 +352,7 @@ fn crates_by_team_id() { #[test] fn crates_by_team_id_not_including_deleted_owners() { - // This needs to use the proxy beacuse removing a team checks with github that you're on the + // This needs to use the proxy because removing a team checks with github that you're on the // team before you're allowed to remove it from the crate let (app, anon) = TestApp::with_proxy().empty(); let user = app.db_new_user(mock_user_on_both_teams().gh_login); diff --git a/src/tests/user.rs b/src/tests/user.rs index e7bff3de267..056ce393c8c 100644 --- a/src/tests/user.rs +++ b/src/tests/user.rs @@ -381,7 +381,7 @@ fn updating_existing_user_doesnt_change_api_token() { This bug is problematic if the user's email preferences are set to private on GitHub, as GitHub will always - send none as the email and we will end up inadvertenly + send none as the email and we will end up inadvertently deleting their email when they sign back in. */ #[test] diff --git a/src/util/errors/json.rs b/src/util/errors/json.rs index da958a6a3da..9f76cd4ee8f 100644 --- a/src/util/errors/json.rs +++ b/src/util/errors/json.rs @@ -15,7 +15,7 @@ fn json_error(detail: &str, status: StatusCode) -> AppResponse { response } -// The following structs are emtpy and do not provide a custom message to the user +// The following structs are empty and do not provide a custom message to the user #[derive(Debug)] pub(crate) struct NotFound;