Skip to content

Commit

Permalink
chore: Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jan 11, 2023
1 parent 247b22f commit 1d6e608
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 28 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

### Changed

- Splitted up registry documentation into multiple sections.
- Split up registry documentation into multiple sections.
[#11480](https://github.com/rust-lang/cargo/pull/11480)

### Fixed
Expand Down Expand Up @@ -55,7 +55,7 @@
[#11349](https://github.com/rust-lang/cargo/pull/11349)
- ❗ Cargo now emits an error if there are multiple registries in the configuration with the same index URL.
[#10592](https://github.com/rust-lang/cargo/pull/10592)
- Cargo now is aware of compression ratio when extracing crate files.
- Cargo now is aware of compression ratio when extracting crate files.
This relaxes the hard size limit introduced in 1.64.0 to mitigate zip bomb attack.
[#11337](https://github.com/rust-lang/cargo/pull/11337)
- Cargo now errors out when `cargo fix` on a git repo with uncommitted changes.
Expand All @@ -65,7 +65,7 @@
- Cargo now warns when running `cargo new/init` and `PATH` env separator
is in the project path.
[#11318](https://github.com/rust-lang/cargo/pull/11318)
- Better error messages when multiple pacakges were found and
- Better error messages when multiple packages were found and
`cargo add/remove` gets confused.
[#11186](https://github.com/rust-lang/cargo/pull/11186)
[#11375](https://github.com/rust-lang/cargo/pull/11375)
Expand Down Expand Up @@ -289,7 +289,7 @@

### Nightly

- Progress indicator for sparse registries becomes more straightfoward.
- Progress indicator for sparse registries becomes more straightforward.
[#11068](https://github.com/rust-lang/cargo/pull/11068)

## Cargo 1.64 (2022-09-22)
Expand Down
2 changes: 1 addition & 1 deletion crates/cargo-util/src/paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ pub fn create_dir_all_excluded_from_backups_atomic(p: impl AsRef<Path>) -> Resul
// here to create the directory directly and fs::create_dir_all() explicitly treats
// the directory being created concurrently by another thread or process as success,
// hence the check below to follow the existing behavior. If we get an error at
// rename() and suddently the directory (which didn't exist a moment earlier) exists
// rename() and suddenly the directory (which didn't exist a moment earlier) exists
// we can infer from it's another cargo process doing work.
if let Err(e) = fs::rename(tempdir.path(), path) {
if !path.exists() {
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/core/compiler/build_context/target_info.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! This modules contains types storing information of target platfroms.
//! This modules contains types storing information of target platforms.
//!
//! Normally, call [`RustcTargetData::new`] to construct all the target
//! platform once, and then query info on your demand. For example,
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/core/compiler/unit_dependencies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ impl<'a, 'cfg> State<'a, 'cfg> {
// did not enable it, don't include it.
if dep.is_optional() {
// This `unit_for` is from parent dep and *SHOULD* contains its own
// artifact dep infomration inside `artifact_target_for_features`.
// artifact dep information inside `artifact_target_for_features`.
// So, no need to map any artifact info from an incorrect `dep.artifact()`.
let features_for = unit_for.map_to_features_for(IS_NO_ARTIFACT_DEP);
if !self.is_dep_activated(pkg_id, features_for, dep.name_in_toml()) {
Expand Down
4 changes: 2 additions & 2 deletions src/cargo/core/profiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
//! which does the followings:
//!
//! - Create a `Profiles` by merging profiles from configs onto the profile
//! from root mainfest (see [`merge_config_profiles`]).
//! from root manifest (see [`merge_config_profiles`]).
//! - Add built-in profiles onto it (see [`Profiles::add_root_profiles`]).
//! - Process profile inheritance for each profiles. (see [`Profiles::add_maker`]).
//!
//! Then you can query a [`Profile`] via [`Profiles::get_profile`], which respects
//! the profile overriden hierarchy described in below. The [`Profile`] you get
//! the profile overridden hierarchy described in below. The [`Profile`] you get
//! is basically an immutable struct containing the compiler flag presets.
//!
//! ## Profile overridden hierarchy
Expand Down
4 changes: 2 additions & 2 deletions src/cargo/ops/cargo_compile/packages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ use crate::util::CargoResult;

use anyhow::{bail, Context as _};

/// Represents the selected pacakges that will be built.
/// Represents the selected packages that will be built.
///
/// Generally, it represents the combination of all `-p` flag. When working within
/// a workspace, `--exclude` and `--workspace` flags also contribute to it.
#[derive(PartialEq, Eq, Debug)]
pub enum Packages {
/// Pacakges selected by default. Ususally means no flag provided.
/// Packages selected by default. Usually means no flag provided.
Default,
/// Opt in all packages.
///
Expand Down
4 changes: 2 additions & 2 deletions src/cargo/ops/cargo_compile/unit_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct Proposal<'a> {
}

/// The context needed for generating root units,
/// which are pacakges the user has requested to compile.
/// which are packages the user has requested to compile.
///
/// To generate a full [`UnitGraph`],
/// generally you need to call [`generate_root_units`] first,
Expand Down Expand Up @@ -700,7 +700,7 @@ Rustdoc did not scrape the following examples because they require dev-dependenc
self.proposals_to_units(proposals)
}

/// Generates units specfically for doc-scraping.
/// Generates units specifically for doc-scraping.
///
/// This requires a separate entrypoint from [`generate_root_units`] because it
/// takes the documented units as input.
Expand Down
4 changes: 2 additions & 2 deletions src/cargo/ops/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ pub fn registry_login(
} else if key_subject.is_some() {
"key-subject"
} else {
unreachable!("how did whe get here");
unreachable!("how did we get here");
};
bail!(
"the `{flag}` flag is unstable, pass `-Z registry-auth` to enable it\n\
Expand Down Expand Up @@ -855,7 +855,7 @@ pub fn registry_login(
if let Some(p) = paserk_public_from_paserk_secret(&secret_key) {
drop_println!(config, "{}", &p);
} else {
bail!("not a validly formated PASERK secret key");
bail!("not a validly formatted PASERK secret key");
}
new_token = RegistryCredentialConfig::AsymmetricKey((
secret_key,
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/sources/registry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ fn max_unpack_size(size: u64) -> u64 {
std::env::var(RATIO_VAR)
.unwrap()
.parse()
.expect("a max compresssion ratio in bytes")
.expect("a max compression ratio in bytes")
} else {
MAX_COMPRESSION_RATIO
};
Expand Down
4 changes: 2 additions & 2 deletions src/cargo/util/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub fn registry_credential_config(
// Find the SourceId's name by its index URL. If environment variables
// are available they will be preferred over configuration values.
//
// The fundimental problem is that we only know the index url of the registry
// The fundamental problem is that we only know the index url of the registry
// for certain. For example, an unnamed registry source can come from the `--index`
// command line argument, or from a Cargo.lock file. For this reason, we always
// attempt to discover the name by looking it up by the index URL.
Expand Down Expand Up @@ -341,7 +341,7 @@ fn auth_token_optional(

if let Some(cache_token_value) = cache.get(url) {
// Tokens for endpoints that do not involve a mutation can always be reused.
// If the value is put in the cach by the command line, then we reuse it without looking at the configuration.
// If the value is put in the cache by the command line, then we reuse it without looking at the configuration.
if cache_token_value.from_commandline
|| cache_token_value.independent_of_endpoint
|| mutation.is_none()
Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-locate-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ manifest is found by searching upward for a file named `Cargo.toml` starting fro
working directory.

If the project happens to be a part of a workspace, the manifest of the project, rather than
the workspace root, is output. This can be overriden by the `--workspace` flag. The root
the workspace root, is output. This can be overridden by the `--workspace` flag. The root
workspace is found by traversing further upward or by using the field `package.workspace` after
locating the manifest of a workspace member.

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/cargo_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ fn cargo_subcommand_env() {
.with_stdout(cargo.to_str().unwrap())
.run();

// Check that subcommands inherit an overriden $CARGO
// Check that subcommands inherit an overridden $CARGO
let envtest_bin = target_dir
.join("cargo-envtest")
.with_extension(std::env::consts::EXE_EXTENSION)
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/config_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn cli_priority() {
}

#[cargo_test]
fn merge_primitives_for_multiple_cli_occurences() {
fn merge_primitives_for_multiple_cli_occurrences() {
let config_path0 = ".cargo/file0.toml";
write_config_at(config_path0, "k = 'file0'");
let config_path1 = ".cargo/file1.toml";
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ k3.public.AmDwjlyf8jAV3gm5Z7Kz9xAOcsKslt_Vwp5v-emjFzBHLCtcANzTaVEghTNEMj9PkQ",
.with_stdin("k3.secret.fNYVuMvBgOlljt9TDohnaYLblghqaHoQquVZwgR6X12cBFHZLFsaU3q7X3k1Zn36")
.run();

// and then it shuld work
// and then it should work
cargo_process("login --key-subject=foo -Z registry-auth")
.masquerade_as_nightly_cargo(&["registry-auth"])
.replace_crates_io(registry.index_url())
Expand Down
12 changes: 6 additions & 6 deletions tests/testsuite/registry_auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn make_project() -> Project {
p
}

static SUCCCESS_OUTPUT: &'static str = "\
static SUCCESS_OUTPUT: &'static str = "\
[UPDATING] `alternative` index
[DOWNLOADING] crates ...
[DOWNLOADED] bar v0.0.1 (registry `alternative`)
Expand Down Expand Up @@ -61,7 +61,7 @@ fn simple() {
.build();

let p = make_project();
cargo(&p, "build").with_stderr(SUCCCESS_OUTPUT).run();
cargo(&p, "build").with_stderr(SUCCESS_OUTPUT).run();
}

#[cargo_test]
Expand All @@ -74,7 +74,7 @@ fn simple_with_asymmetric() {
.build();

let p = make_project();
cargo(&p, "build").with_stderr(SUCCCESS_OUTPUT).run();
cargo(&p, "build").with_stderr(SUCCESS_OUTPUT).run();
}

#[cargo_test]
Expand All @@ -93,7 +93,7 @@ fn environment_config() {
registry.index_url().as_str(),
)
.env("CARGO_REGISTRIES_ALTERNATIVE_TOKEN", registry.token())
.with_stderr(SUCCCESS_OUTPUT)
.with_stderr(SUCCESS_OUTPUT)
.run();
}

Expand All @@ -109,7 +109,7 @@ fn environment_token() {
let p = make_project();
cargo(&p, "build")
.env("CARGO_REGISTRIES_ALTERNATIVE_TOKEN", registry.token())
.with_stderr(SUCCCESS_OUTPUT)
.with_stderr(SUCCESS_OUTPUT)
.run();
}

Expand All @@ -130,7 +130,7 @@ fn environment_token_with_asymmetric() {
let p = make_project();
cargo(&p, "build")
.env("CARGO_REGISTRIES_ALTERNATIVE_SECRET_KEY", registry.key())
.with_stderr(SUCCCESS_OUTPUT)
.with_stderr(SUCCESS_OUTPUT)
.run();
}

Expand Down

0 comments on commit 1d6e608

Please sign in to comment.