From 4740a2e4a9384c1c9aac4316542748b90e9465ed Mon Sep 17 00:00:00 2001 From: Sam Privett Date: Mon, 1 Sep 2025 10:41:42 -0700 Subject: [PATCH] Fix some typos found while digging around the registry implementation --- src/cargo/ops/resolve.rs | 4 ++-- src/cargo/sources/config.rs | 2 +- src/cargo/sources/directory.rs | 2 +- src/cargo/sources/registry/local.rs | 2 +- src/cargo/sources/registry/mod.rs | 2 +- src/cargo/util/auth/mod.rs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cargo/ops/resolve.rs b/src/cargo/ops/resolve.rs index feb0bd1b9..d9d10e735 100644 --- a/src/cargo/ops/resolve.rs +++ b/src/cargo/ops/resolve.rs @@ -1,7 +1,7 @@ //! High-level APIs for executing the resolver. //! //! This module provides functions for running the resolver given a workspace, including loading -//! the `Cargo.lock` file and checkinf if it needs updating. +//! the `Cargo.lock` file and checking if it needs updating. //! //! There are roughly 3 main functions: //! @@ -41,7 +41,7 @@ //! the information that can be found in a registry index. Queries against the //! `PackageRegistry` yields a `Summary`. The resolver uses the summary //! information to build the dependency graph. -//! - [`PackageSet`] --- Contains all of the `Package` objects. This works with the +//! - [`PackageSet`] --- Contains all the `Package` objects. This works with the //! [`Downloads`] struct to coordinate downloading packages. It has a reference //! to the `SourceMap` to get the `Source` objects which tell the `Downloads` //! struct which URLs to fetch. diff --git a/src/cargo/sources/config.rs b/src/cargo/sources/config.rs index 768d760f9..9dbfe56f2 100644 --- a/src/cargo/sources/config.rs +++ b/src/cargo/sources/config.rs @@ -1,7 +1,7 @@ //! Implementation of configuration for various sources. //! //! This module will parse the various `source.*` TOML configuration keys into a -//! structure usable by Cargo itself. Currently this is primarily used to map +//! structure usable by Cargo itself. Currently, this is primarily used to map //! sources to one another via the `replace-with` key in `.cargo/config`. use crate::core::{GitReference, PackageId, SourceId}; diff --git a/src/cargo/sources/directory.rs b/src/cargo/sources/directory.rs index b1bde85fc..a692a0191 100644 --- a/src/cargo/sources/directory.rs +++ b/src/cargo/sources/directory.rs @@ -32,7 +32,7 @@ use serde::Deserialize; /// level of `Cargo.toml` to ensure the integrity when a directory source was /// created (usually by `cargo vendor`). A failure to find or parse a single /// checksum results in a denial of loading any package in this source. -/// * Otherwise, there is no other restrction of the name of directories. At +/// * Otherwise, there is no other restriction of the name of directories. At /// this moment, it is `cargo vendor` that defines the layout and the name of /// each directory. /// diff --git a/src/cargo/sources/registry/local.rs b/src/cargo/sources/registry/local.rs index fa4c0015d..8d81a788a 100644 --- a/src/cargo/sources/registry/local.rs +++ b/src/cargo/sources/registry/local.rs @@ -1,4 +1,4 @@ -//! Access to a regstiry on the local filesystem. See [`LocalRegistry`] for more. +//! Access to a registry on the local filesystem. See [`LocalRegistry`] for more. use crate::core::PackageId; use crate::sources::registry::{LoadResponse, MaybeLock, RegistryConfig, RegistryData}; diff --git a/src/cargo/sources/registry/mod.rs b/src/cargo/sources/registry/mod.rs index 69bb2d875..ccd0acf69 100644 --- a/src/cargo/sources/registry/mod.rs +++ b/src/cargo/sources/registry/mod.rs @@ -594,7 +594,7 @@ impl<'gctx> RegistrySource<'gctx> { /// which case deleting the directory might be the safe thing to do. That /// is probably unlikely, though. /// - /// To be safe, we deletes the directory and starts over again if an empty + /// To be safe, we delete the directory and start over again if an empty /// `.cargo-ok` file is found. /// /// [CVE-2022-36113]: https://blog.rust-lang.org/2022/09/14/cargo-cves.html#arbitrary-file-corruption-cve-2022-36113 diff --git a/src/cargo/util/auth/mod.rs b/src/cargo/util/auth/mod.rs index fa4b4e180..fc8179d8d 100644 --- a/src/cargo/util/auth/mod.rs +++ b/src/cargo/util/auth/mod.rs @@ -42,7 +42,7 @@ pub struct RegistryConfig { _protocol: Option, } -/// The `[registry]` table, which more keys than the `[registries.NAME]` tables. +/// The `[registry]` table, which has more keys than the `[registries.NAME]` tables. /// /// Note: nesting `RegistryConfig` inside this struct and using `serde(flatten)` *should* work /// but fails with "invalid type: sequence, expected a value" when attempting to deserialize.