Skip to content

Commit 5e435ef

Browse files
authored
chore: fix some typos and grammar (#15905)
### What does this PR try to resolve? Fixed some typos and small grammar things I found while poking around the registry implementation. ### How to test and review this PR? Shouldn't need any special testing.
2 parents e24f3ff + 4740a2e commit 5e435ef

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

src/cargo/ops/resolve.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! High-level APIs for executing the resolver.
22
//!
33
//! This module provides functions for running the resolver given a workspace, including loading
4-
//! the `Cargo.lock` file and checkinf if it needs updating.
4+
//! the `Cargo.lock` file and checking if it needs updating.
55
//!
66
//! There are roughly 3 main functions:
77
//!
@@ -41,7 +41,7 @@
4141
//! the information that can be found in a registry index. Queries against the
4242
//! `PackageRegistry` yields a `Summary`. The resolver uses the summary
4343
//! information to build the dependency graph.
44-
//! - [`PackageSet`] --- Contains all of the `Package` objects. This works with the
44+
//! - [`PackageSet`] --- Contains all the `Package` objects. This works with the
4545
//! [`Downloads`] struct to coordinate downloading packages. It has a reference
4646
//! to the `SourceMap` to get the `Source` objects which tell the `Downloads`
4747
//! struct which URLs to fetch.

src/cargo/sources/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Implementation of configuration for various sources.
22
//!
33
//! This module will parse the various `source.*` TOML configuration keys into a
4-
//! structure usable by Cargo itself. Currently this is primarily used to map
4+
//! structure usable by Cargo itself. Currently, this is primarily used to map
55
//! sources to one another via the `replace-with` key in `.cargo/config`.
66
77
use crate::core::{GitReference, PackageId, SourceId};

src/cargo/sources/directory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use serde::Deserialize;
3232
/// level of `Cargo.toml` to ensure the integrity when a directory source was
3333
/// created (usually by `cargo vendor`). A failure to find or parse a single
3434
/// checksum results in a denial of loading any package in this source.
35-
/// * Otherwise, there is no other restrction of the name of directories. At
35+
/// * Otherwise, there is no other restriction of the name of directories. At
3636
/// this moment, it is `cargo vendor` that defines the layout and the name of
3737
/// each directory.
3838
///

src/cargo/sources/registry/local.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Access to a regstiry on the local filesystem. See [`LocalRegistry`] for more.
1+
//! Access to a registry on the local filesystem. See [`LocalRegistry`] for more.
22
33
use crate::core::PackageId;
44
use crate::sources::registry::{LoadResponse, MaybeLock, RegistryConfig, RegistryData};

src/cargo/sources/registry/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ impl<'gctx> RegistrySource<'gctx> {
594594
/// which case deleting the directory might be the safe thing to do. That
595595
/// is probably unlikely, though.
596596
///
597-
/// To be safe, we deletes the directory and starts over again if an empty
597+
/// To be safe, we delete the directory and start over again if an empty
598598
/// `.cargo-ok` file is found.
599599
///
600600
/// [CVE-2022-36113]: https://blog.rust-lang.org/2022/09/14/cargo-cves.html#arbitrary-file-corruption-cve-2022-36113

src/cargo/util/auth/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub struct RegistryConfig {
4242
_protocol: Option<String>,
4343
}
4444

45-
/// The `[registry]` table, which more keys than the `[registries.NAME]` tables.
45+
/// The `[registry]` table, which has more keys than the `[registries.NAME]` tables.
4646
///
4747
/// Note: nesting `RegistryConfig` inside this struct and using `serde(flatten)` *should* work
4848
/// but fails with "invalid type: sequence, expected a value" when attempting to deserialize.

0 commit comments

Comments
 (0)