diff --git a/README.md b/README.md index d0268da4b..219caaf32 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ To run GUI tests: ``` They use the [browser-ui-test](https://github.com/GuillaumeGomez/browser-UI-test/) framework. You -can take a look at its documentation [here](https://github.com/GuillaumeGomez/browser-UI-test/blob/master/goml-script.md). +can take a look at its [documentation](https://github.com/GuillaumeGomez/browser-UI-test/blob/master/goml-script.md). ### Pure docker-compose diff --git a/crates/font-awesome-as-a-crate/src/lib.rs b/crates/font-awesome-as-a-crate/src/lib.rs index a5be02ead..47c27513d 100644 --- a/crates/font-awesome-as-a-crate/src/lib.rs +++ b/crates/font-awesome-as-a-crate/src/lib.rs @@ -123,6 +123,6 @@ mod tests { fn it_works() { assert!(crate::svg(crate::Type::Solid, "gear").is_ok()); assert!(crate::svg(crate::Type::Solid, "download").is_ok()); - assert!(crate::svg(crate::Type::Solid, "giberich").is_err()); + assert!(crate::svg(crate::Type::Solid, "gibberish").is_err()); } } diff --git a/crates/metadata/lib.rs b/crates/metadata/lib.rs index b9cb640c3..4f8f746c8 100644 --- a/crates/metadata/lib.rs +++ b/crates/metadata/lib.rs @@ -267,7 +267,7 @@ impl Metadata { cargo_args.push("--no-default-features".into()); } - // Unconditionnaly set `--cfg docsrs` as it has become a de-facto way to + // Unconditionally set `--cfg docsrs` as it has become a de-facto way to // distinguish docs.rs. // // See https://github.com/rust-lang/docs.rs/issues/2389. diff --git a/gui-tests/tester.js b/gui-tests/tester.js index 4b7e6287a..4ab8d0187 100644 --- a/gui-tests/tester.js +++ b/gui-tests/tester.js @@ -31,7 +31,7 @@ function parseOptions(args) { "no_headless": false, "jobs": -1, }; - const correspondances = { + const correspondences = { "--debug": "debug", "--show-text": "show_text", "--no-headless": "no_headless", @@ -53,15 +53,15 @@ function parseOptions(args) { } opts["jobs"] = parseInt(args[i]); } else if (args[i - 1] !== "--file") { - opts[correspondances[args[i - 1]]] = args[i]; + opts[correspondences[args[i - 1]]] = args[i]; } else { opts["files"].push(args[i]); } } else if (args[i] === "--help") { showHelp(); process.exit(0); - } else if (correspondances[args[i]]) { - opts[correspondances[args[i]]] = true; + } else if (correspondences[args[i]]) { + opts[correspondences[args[i]]] = true; } else { console.log("Unknown option `" + args[i] + "`."); console.log("Use `--help` to see the list of options"); diff --git a/src/bin/cratesfyi.rs b/src/bin/cratesfyi.rs index e3122fa7e..3e7a1713b 100644 --- a/src/bin/cratesfyi.rs +++ b/src/bin/cratesfyi.rs @@ -542,13 +542,13 @@ enum DatabaseSubcommand { version: Option, }, - /// temporary commant to update the `crates.latest_version_id` field + /// temporary command to update the `crates.latest_version_id` field UpdateLatestVersionId, - /// Updates Github/Gitlab stats for crates. + /// Updates GitHub/GitLab stats for crates. UpdateRepositoryFields, - /// Backfill GitHub/Gitlab stats for crates. + /// Backfill GitHub/GitLab stats for crates. BackfillRepositoryStats, /// Updates info for a crate from the registry's API diff --git a/src/cdn.rs b/src/cdn.rs index e354805ea..61fb78b9b 100644 --- a/src/cdn.rs +++ b/src/cdn.rs @@ -19,7 +19,7 @@ use strum::EnumString; use tracing::{debug, info, instrument, warn}; use uuid::Uuid; -/// maximum amout of parallel in-progress wildcard invalidations +/// maximum amount of parallel in-progress wildcard invalidations /// The actual limit is 15, but we want to keep some room for manually /// triggered invalidations const MAX_CLOUDFRONT_WILDCARD_INVALIDATIONS: i32 = 13; diff --git a/src/config.rs b/src/config.rs index 8d420395c..2cb6a1281 100644 --- a/src/config.rs +++ b/src/config.rs @@ -41,7 +41,7 @@ pub struct Config { pub(crate) github_accesstoken: Option, pub(crate) github_updater_min_rate_limit: u32, - // Gitlab authentication + // GitLab authentication pub(crate) gitlab_accesstoken: Option, // Access token for APIs for crates.io (careful: use @@ -132,7 +132,7 @@ impl Config { ("CRATESFYI_RUSTWIDE_WORKSPACE", "DOCSRS_RUSTWIDE_WORKSPACE"), ("DOCS_RS_DOCKER", "DOCSRS_DOCKER"), ("DOCS_RS_LOCAL_DOCKER_IMAGE", "DOCSRS_DOCKER_IMAGE"), - ("DOCS_RS_BULID_CPU_LIMIT", "DOCSRS_BULID_CPU_LIMIT"), + ("DOCS_RS_BUILD_CPU_LIMIT", "DOCSRS_BUILD_CPU_LIMIT"), ]; for (old_var, new_var) in old_vars { if std::env::var(old_var).is_ok() { diff --git a/src/db/add_package.rs b/src/db/add_package.rs index bf15881cf..5f36c441f 100644 --- a/src/db/add_package.rs +++ b/src/db/add_package.rs @@ -1038,7 +1038,7 @@ mod test { } #[test] - fn update_owner_detais() { + fn update_owner_details() { async_wrapper(|env| async move { let mut conn = env.async_db().await.async_conn().await; let crate_id = initialize_crate(&mut conn, "krate").await?; @@ -1300,7 +1300,7 @@ mod test { } #[test] - fn test_long_relaase_version() { + fn test_long_release_version() { async_wrapper(|env| async move { let mut conn = env.async_db().await.async_conn().await; diff --git a/src/docbuilder/rustwide_builder.rs b/src/docbuilder/rustwide_builder.rs index e1ba7ed77..e4862372d 100644 --- a/src/docbuilder/rustwide_builder.rs +++ b/src/docbuilder/rustwide_builder.rs @@ -1461,7 +1461,7 @@ mod tests { .successful ); - // source archice exists + // source archive exists let source_archive = source_archive_path(crate_, version); assert!( env.storage().exists(&source_archive)?, diff --git a/src/metrics/mod.rs b/src/metrics/mod.rs index d6ff4d84b..3f68a5dde 100644 --- a/src/metrics/mod.rs +++ b/src/metrics/mod.rs @@ -329,7 +329,7 @@ impl ServiceMetrics { // When a priority is used at least once, it would be kept in the metric and the last // value would be remembered. `pending_count_by_priority` returns only the priorities // that are currently in the queue, which means when the tasks for a priority are - // finished, we wouldn't update the metric any more, which means a wrong value is + // finished, we wouldn't update the metric anymore, which means a wrong value is // in the metric. // // The solution is to reset the metric, and then set all priorities again. diff --git a/src/repositories/gitlab.rs b/src/repositories/gitlab.rs index 1ce86b651..c274fc652 100644 --- a/src/repositories/gitlab.rs +++ b/src/repositories/gitlab.rs @@ -98,7 +98,7 @@ impl RepositoryForge for GitLab { async fn fetch_repository(&self, name: &RepositoryName) -> Result> { let project_path = format!("{}/{}", name.owner, name.repo); - // Fetch the latest information from the Gitlab API. + // Fetch the latest information from the GitLab API. let response: (GraphResponse, Option) = self .graphql( GRAPHQL_SINGLE, diff --git a/src/storage/s3.rs b/src/storage/s3.rs index c6fe95f28..6af7ca414 100644 --- a/src/storage/s3.rs +++ b/src/storage/s3.rs @@ -22,7 +22,7 @@ use tracing::{error, warn}; const PUBLIC_ACCESS_TAG: &str = "static-cloudfront-access"; const PUBLIC_ACCESS_VALUE: &str = "allow"; -// error codes to check for when trying to determaine if an error is +// error codes to check for when trying to determine if an error is // a "NOT FOUND" error. // Definition taken from the S3 rust SDK, // and validated by manually testing with actual S3. diff --git a/src/test/fakes.rs b/src/test/fakes.rs index bea2a0ae0..83150e9ff 100644 --- a/src/test/fakes.rs +++ b/src/test/fakes.rs @@ -23,7 +23,7 @@ use tracing::debug; /// Create a fake release in the database that failed before the build. /// This is a temporary small factory function only until we refactored the -/// `FakeRelelease` and `FakeBuild` factories to be more flexible. +/// `FakeRelease` and `FakeBuild` factories to be more flexible. pub(crate) async fn fake_release_that_failed_before_build( conn: &mut sqlx::PgConnection, name: &str, diff --git a/src/web/cache.rs b/src/web/cache.rs index b25b2fd58..ff421496a 100644 --- a/src/web/cache.rs +++ b/src/web/cache.rs @@ -28,7 +28,7 @@ pub enum CachePolicy { /// cache for a short time in the browser & CDN. /// right now: one minute. /// Can be used when the content can be a _little_ outdated, - /// while protecting agains spikes in traffic. + /// while protecting against spikes in traffic. ShortInCdnAndBrowser, /// cache forever in browser & CDN. /// Valid when you have hashed / versioned filenames and every rebuild would @@ -39,7 +39,7 @@ pub enum CachePolicy { /// this, for example after building a crate. /// Example usage: `/latest/` rustdoc pages and their redirects. ForeverInCdn, - /// cache forver in the CDN, but allow stale content in the browser. + /// cache forever in the CDN, but allow stale content in the browser. /// Example: rustdoc pages with the version in their URL. /// A browser will show the stale content while getting the up-to-date /// version from the origin server in the background. diff --git a/src/web/mod.rs b/src/web/mod.rs index c4280ee4b..914bada88 100644 --- a/src/web/mod.rs +++ b/src/web/mod.rs @@ -170,7 +170,7 @@ impl MatchedRelease { } } - /// Canonicalize the the version from the request + /// Canonicalize the version from the request /// /// Mainly: /// * "newest"/"*" or empty -> "latest" in the URL @@ -255,7 +255,7 @@ fn semver_match<'a, F: Fn(&Release) -> bool>( // semver `*` does not match pre-releases. // So when we only have pre-releases, `VersionReq::STAR` would lead to an // empty result. - // In this case we just return the latest latest prerelase instead of nothing. + // In this case we just return the latest prerelease instead of nothing. return releases.iter().find(|release| filter(release)); } else { None diff --git a/src/web/page/templates.rs b/src/web/page/templates.rs index df822988c..a39d705da 100644 --- a/src/web/page/templates.rs +++ b/src/web/page/templates.rs @@ -77,7 +77,7 @@ impl TemplateData { // dropped and we don't need to bother rendering the template if !send.is_closed() { // `.send` only fails when the receiver is dropped while we were rendering, - // at which point we don't need the result any more. + // at which point we don't need the result anymore. let _ = send.send(render_fn()); } } diff --git a/src/web/releases.rs b/src/web/releases.rs index 9a0003648..eed4cf075 100644 --- a/src/web/releases.rs +++ b/src/web/releases.rs @@ -1027,7 +1027,7 @@ mod tests { } #[test] - fn search_result_can_retrive_sort_by_from_pagination() { + fn search_result_can_retrieve_sort_by_from_pagination() { async_wrapper(|env| async move { let mut crates_io = mockito::Server::new_async().await; env.override_config(|config| { diff --git a/src/web/rustdoc.rs b/src/web/rustdoc.rs index 50cf4f442..666040803 100644 --- a/src/web/rustdoc.rs +++ b/src/web/rustdoc.rs @@ -2407,7 +2407,7 @@ mod test { ] ); - // test if target-redirect inludes path + // test if target-redirect includes path let releases_response = env .web_app() .await @@ -2590,7 +2590,7 @@ mod test { ); assert!(dom .select(r#"a[href="/optional-dep/1.2.3"] > i[class="dependencies normal"] + i"#) - .expect("shoud have optional dependency") + .expect("should have optional dependency") .any(|el| { el.text_contents().contains("optional") })); let dom = kuchikiki::parse_html().one( env.web_app() @@ -2604,7 +2604,7 @@ mod test { .select( r#"a[href="/crate/optional-dep/1.2.3"] > i[class="dependencies normal"] + i"# ) - .expect("shoud have optional dependency") + .expect("should have optional dependency") .any(|el| { el.text_contents().contains("optional") })); Ok(()) }) @@ -2845,7 +2845,7 @@ mod test { } #[test_case("something.js")] - #[test_case("someting.css")] + #[test_case("something.css")] fn serve_release_specific_static_assets(name: &str) { async_wrapper(|env| async move { env.async_fake_release() diff --git a/templates/crate/source.html b/templates/crate/source.html index 383989a47..5e0e67451 100644 --- a/templates/crate/source.html +++ b/templates/crate/source.html @@ -101,7 +101,7 @@ - {# If the file exeeded the maximum size, display a warning #} + {# If the file exceeds the maximum size, display a warning #} {%- if is_file_too_large -%}
diff --git a/templates/rustdoc/topbar.html b/templates/rustdoc/topbar.html index 3b506e72f..b6751d293 100644 --- a/templates/rustdoc/topbar.html +++ b/templates/rustdoc/topbar.html @@ -80,7 +80,7 @@ {%- endif -%} - {# If a the crate has a repo url, show it #} + {# If the crate has a repo url, show it #} {%- if let Some(repository_url) = krate.repository_url -%}