Skip to content

Commit abc6abe

Browse files
committed
Auto merge of #11561 - epage:typos, r=ehuss
chore: Fix typos Seeing several typo PRs, like #11560, I figured I'd run my source code spell checker on cargo to help catch a lot of these earlier, in one big batch.
2 parents 65a0a89 + ed8b85f commit abc6abe

File tree

18 files changed

+31
-31
lines changed

18 files changed

+31
-31
lines changed

CHANGELOG.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
### Changed
1616

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

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

297297
### Nightly
298298

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

302302
## Cargo 1.64 (2022-09-22)

crates/cargo-util/src/paths.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ pub fn create_dir_all_excluded_from_backups_atomic(p: impl AsRef<Path>) -> Resul
651651
// here to create the directory directly and fs::create_dir_all() explicitly treats
652652
// the directory being created concurrently by another thread or process as success,
653653
// hence the check below to follow the existing behavior. If we get an error at
654-
// rename() and suddently the directory (which didn't exist a moment earlier) exists
654+
// rename() and suddenly the directory (which didn't exist a moment earlier) exists
655655
// we can infer from it's another cargo process doing work.
656656
if let Err(e) = fs::rename(tempdir.path(), path) {
657657
if !path.exists() {

src/cargo/core/compiler/build_context/target_info.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! This modules contains types storing information of target platfroms.
1+
//! This modules contains types storing information of target platforms.
22
//!
33
//! Normally, call [`RustcTargetData::new`] to construct all the target
44
//! platform once, and then query info on your demand. For example,

src/cargo/core/compiler/unit_dependencies.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ impl<'a, 'cfg> State<'a, 'cfg> {
11091109
// did not enable it, don't include it.
11101110
if dep.is_optional() {
11111111
// This `unit_for` is from parent dep and *SHOULD* contains its own
1112-
// artifact dep infomration inside `artifact_target_for_features`.
1112+
// artifact dep information inside `artifact_target_for_features`.
11131113
// So, no need to map any artifact info from an incorrect `dep.artifact()`.
11141114
let features_for = unit_for.map_to_features_for(IS_NO_ARTIFACT_DEP);
11151115
if !self.is_dep_activated(pkg_id, features_for, dep.name_in_toml()) {

src/cargo/core/profiles.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
//! which does the followings:
88
//!
99
//! - Create a `Profiles` by merging profiles from configs onto the profile
10-
//! from root mainfest (see [`merge_config_profiles`]).
10+
//! from root manifest (see [`merge_config_profiles`]).
1111
//! - Add built-in profiles onto it (see [`Profiles::add_root_profiles`]).
1212
//! - Process profile inheritance for each profiles. (see [`Profiles::add_maker`]).
1313
//!
1414
//! Then you can query a [`Profile`] via [`Profiles::get_profile`], which respects
15-
//! the profile overriden hierarchy described in below. The [`Profile`] you get
15+
//! the profile overridden hierarchy described in below. The [`Profile`] you get
1616
//! is basically an immutable struct containing the compiler flag presets.
1717
//!
1818
//! ## Profile overridden hierarchy

src/cargo/ops/cargo_compile/packages.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ use crate::util::CargoResult;
99

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

12-
/// Represents the selected pacakges that will be built.
12+
/// Represents the selected packages that will be built.
1313
///
1414
/// Generally, it represents the combination of all `-p` flag. When working within
1515
/// a workspace, `--exclude` and `--workspace` flags also contribute to it.
1616
#[derive(PartialEq, Eq, Debug)]
1717
pub enum Packages {
18-
/// Pacakges selected by default. Ususally means no flag provided.
18+
/// Packages selected by default. Usually means no flag provided.
1919
Default,
2020
/// Opt in all packages.
2121
///

src/cargo/ops/cargo_compile/unit_generator.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct Proposal<'a> {
3535
}
3636

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

703-
/// Generates units specfically for doc-scraping.
703+
/// Generates units specifically for doc-scraping.
704704
///
705705
/// This requires a separate entrypoint from [`generate_root_units`] because it
706706
/// takes the documented units as input.

src/cargo/ops/registry.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ pub fn registry_login(
814814
} else if key_subject.is_some() {
815815
"key-subject"
816816
} else {
817-
unreachable!("how did whe get here");
817+
unreachable!("how did we get here");
818818
};
819819
bail!(
820820
"the `{flag}` flag is unstable, pass `-Z registry-auth` to enable it\n\
@@ -855,7 +855,7 @@ pub fn registry_login(
855855
if let Some(p) = paserk_public_from_paserk_secret(&secret_key) {
856856
drop_println!(config, "{}", &p);
857857
} else {
858-
bail!("not a validly formated PASERK secret key");
858+
bail!("not a validly formatted PASERK secret key");
859859
}
860860
new_token = RegistryCredentialConfig::AsymmetricKey((
861861
secret_key,

src/cargo/sources/registry/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ fn max_unpack_size(size: u64) -> u64 {
890890
std::env::var(RATIO_VAR)
891891
.unwrap()
892892
.parse()
893-
.expect("a max compresssion ratio in bytes")
893+
.expect("a max compression ratio in bytes")
894894
} else {
895895
MAX_COMPRESSION_RATIO
896896
};

src/cargo/util/auth.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub fn registry_credential_config(
7272
// Find the SourceId's name by its index URL. If environment variables
7373
// are available they will be preferred over configuration values.
7474
//
75-
// The fundimental problem is that we only know the index url of the registry
75+
// The fundamental problem is that we only know the index url of the registry
7676
// for certain. For example, an unnamed registry source can come from the `--index`
7777
// command line argument, or from a Cargo.lock file. For this reason, we always
7878
// attempt to discover the name by looking it up by the index URL.
@@ -341,7 +341,7 @@ fn auth_token_optional(
341341

342342
if let Some(cache_token_value) = cache.get(url) {
343343
// Tokens for endpoints that do not involve a mutation can always be reused.
344-
// If the value is put in the cach by the command line, then we reuse it without looking at the configuration.
344+
// If the value is put in the cache by the command line, then we reuse it without looking at the configuration.
345345
if cache_token_value.from_commandline
346346
|| cache_token_value.independent_of_endpoint
347347
|| mutation.is_none()

src/doc/man/cargo-locate-project.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ manifest is found by searching upward for a file named `Cargo.toml` starting fro
1515
working directory.
1616

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

src/doc/man/generated_txt/cargo-locate-project.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ DESCRIPTION
1414

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

src/doc/src/commands/cargo-locate-project.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ manifest is found by searching upward for a file named `Cargo.toml` starting fro
1515
working directory.
1616

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

src/etc/man/cargo-locate-project.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ manifest is found by searching upward for a file named \fBCargo.toml\fR starting
1313
working directory.
1414
.sp
1515
If the project happens to be a part of a workspace, the manifest of the project, rather than
16-
the workspace root, is output. This can be overriden by the \fB\-\-workspace\fR flag. The root
16+
the workspace root, is output. This can be overridden by the \fB\-\-workspace\fR flag. The root
1717
workspace is found by traversing further upward or by using the field \fBpackage.workspace\fR after
1818
locating the manifest of a workspace member.
1919
.SH "OPTIONS"

tests/testsuite/cargo_command.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ fn cargo_subcommand_env() {
343343
.with_stdout(cargo.to_str().unwrap())
344344
.run();
345345

346-
// Check that subcommands inherit an overriden $CARGO
346+
// Check that subcommands inherit an overridden $CARGO
347347
let envtest_bin = target_dir
348348
.join("cargo-envtest")
349349
.with_extension(std::env::consts::EXE_EXTENSION)

tests/testsuite/config_cli.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fn cli_priority() {
5656
}
5757

5858
#[cargo_test]
59-
fn merge_primitives_for_multiple_cli_occurences() {
59+
fn merge_primitives_for_multiple_cli_occurrences() {
6060
let config_path0 = ".cargo/file0.toml";
6161
write_config_at(config_path0, "k = 'file0'");
6262
let config_path1 = ".cargo/file1.toml";

tests/testsuite/login.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ k3.public.AmDwjlyf8jAV3gm5Z7Kz9xAOcsKslt_Vwp5v-emjFzBHLCtcANzTaVEghTNEMj9PkQ",
294294
.with_stdin("k3.secret.fNYVuMvBgOlljt9TDohnaYLblghqaHoQquVZwgR6X12cBFHZLFsaU3q7X3k1Zn36")
295295
.run();
296296

297-
// and then it shuld work
297+
// and then it should work
298298
cargo_process("login --key-subject=foo -Z registry-auth")
299299
.masquerade_as_nightly_cargo(&["registry-auth"])
300300
.replace_crates_io(registry.index_url())

tests/testsuite/registry_auth.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn make_project() -> Project {
3232
p
3333
}
3434

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

6363
let p = make_project();
64-
cargo(&p, "build").with_stderr(SUCCCESS_OUTPUT).run();
64+
cargo(&p, "build").with_stderr(SUCCESS_OUTPUT).run();
6565
}
6666

6767
#[cargo_test]
@@ -74,7 +74,7 @@ fn simple_with_asymmetric() {
7474
.build();
7575

7676
let p = make_project();
77-
cargo(&p, "build").with_stderr(SUCCCESS_OUTPUT).run();
77+
cargo(&p, "build").with_stderr(SUCCESS_OUTPUT).run();
7878
}
7979

8080
#[cargo_test]
@@ -93,7 +93,7 @@ fn environment_config() {
9393
registry.index_url().as_str(),
9494
)
9595
.env("CARGO_REGISTRIES_ALTERNATIVE_TOKEN", registry.token())
96-
.with_stderr(SUCCCESS_OUTPUT)
96+
.with_stderr(SUCCESS_OUTPUT)
9797
.run();
9898
}
9999

@@ -109,7 +109,7 @@ fn environment_token() {
109109
let p = make_project();
110110
cargo(&p, "build")
111111
.env("CARGO_REGISTRIES_ALTERNATIVE_TOKEN", registry.token())
112-
.with_stderr(SUCCCESS_OUTPUT)
112+
.with_stderr(SUCCESS_OUTPUT)
113113
.run();
114114
}
115115

@@ -130,7 +130,7 @@ fn environment_token_with_asymmetric() {
130130
let p = make_project();
131131
cargo(&p, "build")
132132
.env("CARGO_REGISTRIES_ALTERNATIVE_SECRET_KEY", registry.key())
133-
.with_stderr(SUCCCESS_OUTPUT)
133+
.with_stderr(SUCCESS_OUTPUT)
134134
.run();
135135
}
136136

0 commit comments

Comments
 (0)