Skip to content

Commit

Permalink
Fix typos/spelling
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Soref <[email protected]>
  • Loading branch information
jsoref committed Dec 30, 2024
1 parent 16ebd6f commit 79d0ae2
Show file tree
Hide file tree
Showing 20 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion crates/font-awesome-as-a-crate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
2 changes: 1 addition & 1 deletion crates/metadata/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions gui-tests/tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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");
Expand Down
6 changes: 3 additions & 3 deletions src/bin/cratesfyi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,13 +542,13 @@ enum DatabaseSubcommand {
version: Option<i64>,
},

/// 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
Expand Down
2 changes: 1 addition & 1 deletion src/cdn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub struct Config {
pub(crate) github_accesstoken: Option<String>,
pub(crate) github_updater_min_rate_limit: u32,

// Gitlab authentication
// GitLab authentication
pub(crate) gitlab_accesstoken: Option<String>,

// Access token for APIs for crates.io (careful: use
Expand Down Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src/db/add_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;
Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/docbuilder/rustwide_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?,
Expand Down
2 changes: 1 addition & 1 deletion src/metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/repositories/gitlab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl RepositoryForge for GitLab {

async fn fetch_repository(&self, name: &RepositoryName) -> Result<Option<Repository>> {
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<GraphProjectNode>, Option<usize>) = self
.graphql(
GRAPHQL_SINGLE,
Expand Down
2 changes: 1 addition & 1 deletion src/storage/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/test/fakes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/web/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/web/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/web/page/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/web/releases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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| {
Expand Down
8 changes: 4 additions & 4 deletions src/web/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -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(())
})
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion templates/crate/source.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
</div>
</div>

{# 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 -%}
<div id="source-warning" class="pure-u-1 pure-u-sm-17-24 pure-u-md-19-24">
<div class="warning">
Expand Down
2 changes: 1 addition & 1 deletion templates/rustdoc/topbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</li>
{%- 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 -%}
<li class="pure-menu-item">
<a href="{{ repository_url }}" class="pure-menu-link">
Expand Down

0 comments on commit 79d0ae2

Please sign in to comment.