mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
fix a bunch of typos found by codespell
This commit is contained in:
parent
b3d7b5089f
commit
670a3df462
@ -6,7 +6,7 @@ use std::cmp;
|
|||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
pub struct Options {
|
pub struct Options {
|
||||||
flag_index: Option<String>,
|
flag_index: Option<String>,
|
||||||
flag_host: Option<String>, // TODO: Depricated, remove
|
flag_host: Option<String>, // TODO: Deprecated, remove
|
||||||
flag_verbose: u32,
|
flag_verbose: u32,
|
||||||
flag_quiet: Option<bool>,
|
flag_quiet: Option<bool>,
|
||||||
flag_color: Option<String>,
|
flag_color: Option<String>,
|
||||||
@ -49,7 +49,7 @@ pub fn execute(options: Options, config: &mut Config) -> CliResult {
|
|||||||
&options.flag_z)?;
|
&options.flag_z)?;
|
||||||
let Options {
|
let Options {
|
||||||
flag_index: index,
|
flag_index: index,
|
||||||
flag_host: host, // TODO: Depricated, remove
|
flag_host: host, // TODO: Deprecated, remove
|
||||||
flag_limit: limit,
|
flag_limit: limit,
|
||||||
arg_query: query,
|
arg_query: query,
|
||||||
flag_registry: registry,
|
flag_registry: registry,
|
||||||
@ -61,7 +61,7 @@ pub fn execute(options: Options, config: &mut Config) -> CliResult {
|
|||||||
requires -Zunstable-options to use.").into())
|
requires -Zunstable-options to use.").into())
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Depricated
|
// TODO: Deprecated
|
||||||
// remove once it has been decided --host can be safely removed
|
// remove once it has been decided --host can be safely removed
|
||||||
// We may instead want to repurpose the host flag, as
|
// We may instead want to repurpose the host flag, as
|
||||||
// mentioned in this issue
|
// mentioned in this issue
|
||||||
@ -70,7 +70,7 @@ pub fn execute(options: Options, config: &mut Config) -> CliResult {
|
|||||||
let msg = "The flag '--host' is no longer valid.
|
let msg = "The flag '--host' is no longer valid.
|
||||||
|
|
||||||
Previous versions of Cargo accepted this flag, but it is being
|
Previous versions of Cargo accepted this flag, but it is being
|
||||||
depricated. The flag is being renamed to 'index', as the flag
|
deprecated. The flag is being renamed to 'index', as the flag
|
||||||
wants the location of the index in which to search. Please
|
wants the location of the index in which to search. Please
|
||||||
use '--index' instead.
|
use '--index' instead.
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ impl Package {
|
|||||||
pub fn manifest_path(&self) -> &Path { &self.manifest_path }
|
pub fn manifest_path(&self) -> &Path { &self.manifest_path }
|
||||||
/// Get the name of the package
|
/// Get the name of the package
|
||||||
pub fn name(&self) -> &str { self.package_id().name() }
|
pub fn name(&self) -> &str { self.package_id().name() }
|
||||||
/// Get the PackageId object for the package (fully defines a packge)
|
/// Get the PackageId object for the package (fully defines a package)
|
||||||
pub fn package_id(&self) -> &PackageId { self.manifest.package_id() }
|
pub fn package_id(&self) -> &PackageId { self.manifest.package_id() }
|
||||||
/// Get the root folder of the package
|
/// Get the root folder of the package
|
||||||
pub fn root(&self) -> &Path { self.manifest_path.parent().unwrap() }
|
pub fn root(&self) -> &Path { self.manifest_path.parent().unwrap() }
|
||||||
|
@ -620,7 +620,7 @@ fn activate_deps_loop<'a>(mut cx: Context<'a>,
|
|||||||
// You'll note that a few stacks are maintained on the side, which might
|
// You'll note that a few stacks are maintained on the side, which might
|
||||||
// seem odd when this algorithm looks like it could be implemented
|
// seem odd when this algorithm looks like it could be implemented
|
||||||
// recursively. While correct, this is implemented iteratively to avoid
|
// recursively. While correct, this is implemented iteratively to avoid
|
||||||
// blowing the stack (the recusion depth is proportional to the size of the
|
// blowing the stack (the recursion depth is proportional to the size of the
|
||||||
// input).
|
// input).
|
||||||
//
|
//
|
||||||
// The general sketch of this loop is to run until there are no dependencies
|
// The general sketch of this loop is to run until there are no dependencies
|
||||||
@ -1073,7 +1073,7 @@ impl<'a> Context<'a> {
|
|||||||
registry: &mut Registry,
|
registry: &mut Registry,
|
||||||
candidate: &Summary,
|
candidate: &Summary,
|
||||||
method: &Method) -> CargoResult<Vec<DepInfo>> {
|
method: &Method) -> CargoResult<Vec<DepInfo>> {
|
||||||
// First, figure out our set of dependencies based on the requsted set
|
// First, figure out our set of dependencies based on the requested set
|
||||||
// of features. This also calculates what features we're going to enable
|
// of features. This also calculates what features we're going to enable
|
||||||
// for our own dependencies.
|
// for our own dependencies.
|
||||||
let deps = self.resolve_features(candidate, method)?;
|
let deps = self.resolve_features(candidate, method)?;
|
||||||
|
@ -7,7 +7,7 @@ use core::{Dependency, PackageId, SourceId};
|
|||||||
|
|
||||||
use util::CargoResult;
|
use util::CargoResult;
|
||||||
|
|
||||||
/// Subset of a `Manifest`. Contains only the most important informations about
|
/// Subset of a `Manifest`. Contains only the most important information about
|
||||||
/// a package.
|
/// a package.
|
||||||
///
|
///
|
||||||
/// Summaries are cloned, and should not be mutated after creation
|
/// Summaries are cloned, and should not be mutated after creation
|
||||||
|
@ -41,7 +41,7 @@ use super::{Kind, Compilation, BuildConfig};
|
|||||||
/// all that out.
|
/// all that out.
|
||||||
#[derive(Clone, Copy, Eq, PartialEq, Hash)]
|
#[derive(Clone, Copy, Eq, PartialEq, Hash)]
|
||||||
pub struct Unit<'a> {
|
pub struct Unit<'a> {
|
||||||
/// Information about avaiable targets, which files to include/exclude, etc. Basically stuff in
|
/// Information about available targets, which files to include/exclude, etc. Basically stuff in
|
||||||
/// `Cargo.toml`.
|
/// `Cargo.toml`.
|
||||||
pub pkg: &'a Package,
|
pub pkg: &'a Package,
|
||||||
/// Information about the specific target to build, out of the possible targets in `pkg`. Not
|
/// Information about the specific target to build, out of the possible targets in `pkg`. Not
|
||||||
|
@ -97,10 +97,10 @@ impl<'cfg> PathSource<'cfg> {
|
|||||||
/// 1) Only warn users about the future change iff their matching rules are
|
/// 1) Only warn users about the future change iff their matching rules are
|
||||||
/// affected. (CURRENT STAGE)
|
/// affected. (CURRENT STAGE)
|
||||||
///
|
///
|
||||||
/// 2) Switch to the new strategy and upate documents. Still keep warning
|
/// 2) Switch to the new strategy and update documents. Still keep warning
|
||||||
/// affected users.
|
/// affected users.
|
||||||
///
|
///
|
||||||
/// 3) Drop the old strategy and no mor warnings.
|
/// 3) Drop the old strategy and no more warnings.
|
||||||
///
|
///
|
||||||
/// See <https://github.com/rust-lang/cargo/issues/4268> for more info.
|
/// See <https://github.com/rust-lang/cargo/issues/4268> for more info.
|
||||||
pub fn list_files(&self, pkg: &Package) -> CargoResult<Vec<PathBuf>> {
|
pub fn list_files(&self, pkg: &Package) -> CargoResult<Vec<PathBuf>> {
|
||||||
|
@ -177,7 +177,7 @@ impl<'cfg> RegistryIndex<'cfg> {
|
|||||||
// Handle `cargo update --precise` here. If specified, our own source
|
// Handle `cargo update --precise` here. If specified, our own source
|
||||||
// will have a precise version listed of the form `<pkg>=<req>` where
|
// will have a precise version listed of the form `<pkg>=<req>` where
|
||||||
// `<pkg>` is the name of a crate on this source and `<req>` is the
|
// `<pkg>` is the name of a crate on this source and `<req>` is the
|
||||||
// version requested (agument to `--precise`).
|
// version requested (argument to `--precise`).
|
||||||
let summaries = summaries.filter(|s| {
|
let summaries = summaries.filter(|s| {
|
||||||
match source_id.precise() {
|
match source_id.precise() {
|
||||||
Some(p) if p.starts_with(dep.name()) &&
|
Some(p) if p.starts_with(dep.name()) &&
|
||||||
|
@ -46,8 +46,8 @@ fn _process(t: &OsStr) -> cargo::util::ProcessBuilder {
|
|||||||
.env("__CARGO_TEST_ROOT", support::paths::root())
|
.env("__CARGO_TEST_ROOT", support::paths::root())
|
||||||
|
|
||||||
// Force cargo to think it's on the stable channel for all tests, this
|
// Force cargo to think it's on the stable channel for all tests, this
|
||||||
// should hopefully not suprise us as we add cargo features over time and
|
// should hopefully not surprise us as we add cargo features over time and
|
||||||
// cargo rides the trains
|
// cargo rides the trains.
|
||||||
.env("__CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS", "stable")
|
.env("__CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS", "stable")
|
||||||
|
|
||||||
// For now disable incremental by default as support hasn't ridden to the
|
// For now disable incremental by default as support hasn't ridden to the
|
||||||
|
@ -563,7 +563,7 @@ impl Execs {
|
|||||||
} {}
|
} {}
|
||||||
|
|
||||||
ham::expect(matches == number,
|
ham::expect(matches == number,
|
||||||
format!("expected to find {} occurences:\n\
|
format!("expected to find {} occurrences:\n\
|
||||||
{}\n\n\
|
{}\n\n\
|
||||||
did not find in output:\n\
|
did not find in output:\n\
|
||||||
{}", number, out,
|
{}", number, out,
|
||||||
|
@ -17,7 +17,7 @@ fn enabled() -> bool {
|
|||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
// On Windows suport for these tests is only enabled through the usage of job
|
// On Windows support for these tests is only enabled through the usage of job
|
||||||
// objects. Support for nested job objects, however, was added in recent-ish
|
// objects. Support for nested job objects, however, was added in recent-ish
|
||||||
// versions of Windows, so this test may not always be able to succeed.
|
// versions of Windows, so this test may not always be able to succeed.
|
||||||
//
|
//
|
||||||
|
@ -88,7 +88,7 @@ fn simple() {
|
|||||||
hoare = \"0.1.1\" # Design by contract style assertions for Rust"));
|
hoare = \"0.1.1\" # Design by contract style assertions for Rust"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Depricated
|
// TODO: Deprecated
|
||||||
// remove once it has been decided '--host' can be safely removed
|
// remove once it has been decided '--host' can be safely removed
|
||||||
#[test]
|
#[test]
|
||||||
fn simple_with_host() {
|
fn simple_with_host() {
|
||||||
@ -140,7 +140,7 @@ fn simple_with_host() {
|
|||||||
[WARNING] The flag '--host' is no longer valid.
|
[WARNING] The flag '--host' is no longer valid.
|
||||||
|
|
||||||
Previous versions of Cargo accepted this flag, but it is being
|
Previous versions of Cargo accepted this flag, but it is being
|
||||||
depricated. The flag is being renamed to 'index', as the flag
|
deprecated. The flag is being renamed to 'index', as the flag
|
||||||
wants the location of the index in which to search. Please
|
wants the location of the index in which to search. Please
|
||||||
use '--index' instead.
|
use '--index' instead.
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ about this warning.
|
|||||||
hoare = \"0.1.1\" # Design by contract style assertions for Rust"));
|
hoare = \"0.1.1\" # Design by contract style assertions for Rust"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Depricated
|
// TODO: Deprecated
|
||||||
// remove once it has been decided '--host' can be safely removed
|
// remove once it has been decided '--host' can be safely removed
|
||||||
#[test]
|
#[test]
|
||||||
fn simple_with_index_and_host() {
|
fn simple_with_index_and_host() {
|
||||||
@ -207,7 +207,7 @@ fn simple_with_index_and_host() {
|
|||||||
[WARNING] The flag '--host' is no longer valid.
|
[WARNING] The flag '--host' is no longer valid.
|
||||||
|
|
||||||
Previous versions of Cargo accepted this flag, but it is being
|
Previous versions of Cargo accepted this flag, but it is being
|
||||||
depricated. The flag is being renamed to 'index', as the flag
|
deprecated. The flag is being renamed to 'index', as the flag
|
||||||
wants the location of the index in which to search. Please
|
wants the location of the index in which to search. Please
|
||||||
use '--index' instead.
|
use '--index' instead.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user