Skip to content

fix some typos #4795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/initializers/hashchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/bin/background-worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/version/metadata.rs
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/downloads_counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
//
Expand Down
2 changes: 1 addition & 1 deletion src/tests/krate/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/owners.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down
2 changes: 1 addition & 1 deletion src/tests/team.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/util/errors/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down