mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
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.
This commit is contained in:
commit
5e435eff9f
@ -1,7 +1,7 @@
|
|||||||
//! High-level APIs for executing the resolver.
|
//! High-level APIs for executing the resolver.
|
||||||
//!
|
//!
|
||||||
//! This module provides functions for running the resolver given a workspace, including loading
|
//! 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:
|
//! There are roughly 3 main functions:
|
||||||
//!
|
//!
|
||||||
@ -41,7 +41,7 @@
|
|||||||
//! the information that can be found in a registry index. Queries against the
|
//! the information that can be found in a registry index. Queries against the
|
||||||
//! `PackageRegistry` yields a `Summary`. The resolver uses the summary
|
//! `PackageRegistry` yields a `Summary`. The resolver uses the summary
|
||||||
//! information to build the dependency graph.
|
//! 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
|
//! [`Downloads`] struct to coordinate downloading packages. It has a reference
|
||||||
//! to the `SourceMap` to get the `Source` objects which tell the `Downloads`
|
//! to the `SourceMap` to get the `Source` objects which tell the `Downloads`
|
||||||
//! struct which URLs to fetch.
|
//! struct which URLs to fetch.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//! Implementation of configuration for various sources.
|
//! Implementation of configuration for various sources.
|
||||||
//!
|
//!
|
||||||
//! This module will parse the various `source.*` TOML configuration keys into a
|
//! 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`.
|
//! sources to one another via the `replace-with` key in `.cargo/config`.
|
||||||
|
|
||||||
use crate::core::{GitReference, PackageId, SourceId};
|
use crate::core::{GitReference, PackageId, SourceId};
|
||||||
|
@ -32,7 +32,7 @@ use serde::Deserialize;
|
|||||||
/// level of `Cargo.toml` to ensure the integrity when a directory source was
|
/// 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
|
/// 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.
|
/// 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
|
/// this moment, it is `cargo vendor` that defines the layout and the name of
|
||||||
/// each directory.
|
/// each directory.
|
||||||
///
|
///
|
||||||
|
@ -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::core::PackageId;
|
||||||
use crate::sources::registry::{LoadResponse, MaybeLock, RegistryConfig, RegistryData};
|
use crate::sources::registry::{LoadResponse, MaybeLock, RegistryConfig, RegistryData};
|
||||||
|
@ -594,7 +594,7 @@ impl<'gctx> RegistrySource<'gctx> {
|
|||||||
/// which case deleting the directory might be the safe thing to do. That
|
/// which case deleting the directory might be the safe thing to do. That
|
||||||
/// is probably unlikely, though.
|
/// 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.
|
/// `.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
|
/// [CVE-2022-36113]: https://blog.rust-lang.org/2022/09/14/cargo-cves.html#arbitrary-file-corruption-cve-2022-36113
|
||||||
|
@ -42,7 +42,7 @@ pub struct RegistryConfig {
|
|||||||
_protocol: Option<String>,
|
_protocol: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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
|
/// 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.
|
/// but fails with "invalid type: sequence, expected a value" when attempting to deserialize.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user