mirror of https://github.com/rust-lang/cargo
chore: Fix typos
This commit is contained in:
parent
247b22f225
commit
ed8b85f10e
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
///
|
||||
|
|
|
@ -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,
|
||||
|
@ -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.
|
||||
|
|
|
@ -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\
|
||||
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
|
|
@ -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.
|
||||
|
@ -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()
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ DESCRIPTION
|
|||
|
||||
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 workspace is found by
|
||||
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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ manifest is found by searching upward for a file named \fBCargo.toml\fR starting
|
|||
working directory.
|
||||
.sp
|
||||
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 \fB\-\-workspace\fR flag. The root
|
||||
the workspace root, is output. This can be overridden by the \fB\-\-workspace\fR flag. The root
|
||||
workspace is found by traversing further upward or by using the field \fBpackage.workspace\fR after
|
||||
locating the manifest of a workspace member.
|
||||
.SH "OPTIONS"
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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`)
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue