Skip to content

Commit 05bf93c

Browse files
authored
chore: Address most typos (#15911)
This PR addresses typos found using [`typos`](https://github.com/crate-ci/typos) (config file below) <details> <summary>typos.toml</summary> ```toml # Files to ignore [files] extend-exclude = ["LICENSE-THIRD-PARTY"] [default] extend-ignore-identifiers-re = ["\\bTLS_[A-Z0-9_]+(_anon_[A-Z0-9_]+)?\\b"] extend-ignore-re = [ # Handles git short SHA-1 hashes "[a-f0-9]{8,9}", # Handles ssh keys "AAAA[0-9A-Za-z+/]+[=]{0,3}", # Handles paseto from login tests "k3[.](secret|public)[.][a-zA-Z0-9_-]+", ] [default.extend-identifiers] rela_path = "rela_path" rela_pkg_root = "rela_pkg_root" rela_root = "rela_root" SSHed = "SSHed" # Allow these "words" in all files [default.extend-words] aout = "aout" ba = "ba" EXCED = "EXCED" filetimes = "filetimes" flate = "flate" fing = "fing" fo = "fo" lits = "lits" mis = "mis" objekt = "objekt" zuser = "zuser" # Allow these words in specific files [type.bad_config] extend-glob = ["bad_config.rs"] extend-words.bulid = "bulid" [type.makro] extend-glob = ["makro.rs", "proc-macro-observer.rs"] extend-words.makro = "makro" ``` </details>
2 parents 37b85ad + 022dc5b commit 05bf93c

File tree

34 files changed

+54
-56
lines changed

34 files changed

+54
-56
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ contact_links:
77
url: https://internals.rust-lang.org/c/tools-and-infrastructure/cargo
88
about: >
99
Need more discussions with your next big idea?
10-
Reach out the coummunity on the internals forum.
10+
Reach out the community on the internals forum.

crates/cargo-test-support/src/registry.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ use time::format_description::well_known::Rfc3339;
6464
use time::{Duration, OffsetDateTime};
6565
use url::Url;
6666

67-
/// Path to the local index for psuedo-crates.io.
67+
/// Path to the local index for pseudo-crates.io.
6868
///
6969
/// This is a Git repo
7070
/// initialized with a `config.json` file pointing to `dl_path` for downloads
@@ -622,7 +622,7 @@ struct PackageFile {
622622

623623
const DEFAULT_MODE: u32 = 0o644;
624624

625-
/// Setup a local psuedo-crates.io [`TestRegistry`]
625+
/// Setup a local pseudo-crates.io [`TestRegistry`]
626626
///
627627
/// This is implicitly called by [`Package::new`].
628628
///

crates/crates-io/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pub enum Error {
143143
#[error(transparent)]
144144
Curl(#[from] curl::Error),
145145

146-
/// Error from seriailzing the request payload and deserializing the
146+
/// Error from serializing the request payload and deserializing the
147147
/// response body (like response body didn't match expected structure).
148148
#[error(transparent)]
149149
Json(#[from] serde_json::Error),
@@ -183,7 +183,7 @@ pub enum Error {
183183
#[error("{0}")]
184184
InvalidToken(&'static str),
185185

186-
/// Server was unavailable and timeouted. Happened when uploading a way
186+
/// Server was unavailable and timed out. Happened when uploading a way
187187
/// too large tarball to crates.io.
188188
#[error(
189189
"Request timed out after 30 seconds. If you're trying to \

crates/home/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ fn home_dir_inner() -> Option<PathBuf> {
7575
std::env::home_dir()
7676
}
7777

78-
/// Returns the storage directory used by Cargo, often knowns as
78+
/// Returns the storage directory used by Cargo, often known as
7979
/// `.cargo` or `CARGO_HOME`.
8080
///
8181
/// It returns one of the following values, in this order of
@@ -112,7 +112,7 @@ pub fn cargo_home_with_cwd(cwd: &Path) -> io::Result<PathBuf> {
112112
env::cargo_home_with_cwd_env(&env::OS_ENV, cwd)
113113
}
114114

115-
/// Returns the storage directory used by rustup, often knowns as
115+
/// Returns the storage directory used by rustup, often known as
116116
/// `.rustup` or `RUSTUP_HOME`.
117117
///
118118
/// It returns one of the following values, in this order of

src/bin/cargo/cli.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ pub fn main(gctx: &mut GlobalContext) -> CliResult {
6969
} else if let Some(code) = expanded_args.get_one::<String>("explain") {
7070
// Don't let config errors get in the way of parsing arguments
7171
let _ = configure_gctx(gctx, &expanded_args, None, global_args, None);
72-
let mut procss = gctx.load_global_rustc(None)?.process();
73-
procss.arg("--explain").arg(code).exec()?;
72+
let mut process = gctx.load_global_rustc(None)?.process();
73+
process.arg("--explain").arg(code).exec()?;
7474
} else if expanded_args.flag("list") {
7575
// Don't let config errors get in the way of parsing arguments
7676
let _ = configure_gctx(gctx, &expanded_args, None, global_args, None);

src/cargo/core/compiler/fingerprint/dep_info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ mod encoded_dep_info {
756756
0x72, 0x75, 0x73, 0x74, // path bytes: "rust"
757757
0x00, 0x00, 0x00, 0x00, // # of env vars
758758
];
759-
// Cargo can't recognize v0 after `-Zchecksum-freshess` added.
759+
// Cargo can't recognize v0 after `-Zchecksum-freshness` added.
760760
assert!(EncodedDepInfo::parse(&data).is_none());
761761
}
762762
}

src/cargo/core/compiler/fingerprint/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1962,12 +1962,12 @@ where
19621962
return Some(StaleItem::MissingFile(reference.to_path_buf()));
19631963
};
19641964

1965-
let skipable_dirs = if let Ok(cargo_home) = home::cargo_home() {
1966-
let skipable_dirs: Vec<_> = ["git", "registry"]
1965+
let skippable_dirs = if let Ok(cargo_home) = home::cargo_home() {
1966+
let skippable_dirs: Vec<_> = ["git", "registry"]
19671967
.into_iter()
19681968
.map(|subfolder| cargo_home.join(subfolder))
19691969
.collect();
1970-
Some(skipable_dirs)
1970+
Some(skippable_dirs)
19711971
} else {
19721972
None
19731973
};
@@ -1978,8 +1978,8 @@ where
19781978
// (see also #9455 about marking the src directory readonly) which avoids rebuilds when CI
19791979
// caches $CARGO_HOME/registry/{index, cache} and $CARGO_HOME/git/db across runs, keeping
19801980
// the content the same but changing the mtime.
1981-
if let Some(ref skipable_dirs) = skipable_dirs {
1982-
if skipable_dirs.iter().any(|dir| path.starts_with(dir)) {
1981+
if let Some(ref skippable_dirs) = skippable_dirs {
1982+
if skippable_dirs.iter().any(|dir| path.starts_with(dir)) {
19831983
continue;
19841984
}
19851985
}

src/cargo/core/compiler/job_queue/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ pub struct WarningCount {
213213
/// were duplicates of a previous warning
214214
pub duplicates: usize,
215215
/// number of fixable warnings set to `NotAllowed`
216-
/// if any errors have been seen ofr the current
216+
/// if any errors have been seen for the current
217217
/// target
218218
pub fixable: FixableWarnings,
219219
}

src/cargo/core/compiler/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ fn compile<'gctx>(
183183
}
184184

185185
// If we are in `--compile-time-deps` and the given unit is not a compile time
186-
// dependency, skip compling the unit and jumps to dependencies, which still
186+
// dependency, skip compiling the unit and jumps to dependencies, which still
187187
// have chances to be compile time dependencies
188188
if !unit.skip_non_compile_time_dep {
189189
// Build up the work to be done to compile this unit, enqueuing it once
@@ -1615,7 +1615,7 @@ fn check_cfg_args(unit: &Unit) -> Vec<OsString> {
16151615
arg_feature.push("))");
16161616

16171617
// In addition to the package features, we also include the `test` cfg (since
1618-
// compiler-team#785, as to be able to someday apply yt conditionally), as well
1618+
// compiler-team#785, as to be able to someday apply it conditionally), as well
16191619
// the `docsrs` cfg from the docs.rs service.
16201620
//
16211621
// We include `docsrs` here (in Cargo) instead of rustc, since there is a much closer

src/cargo/core/compiler/output_depinfo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::util::{CargoResult, internal};
1111
use cargo_util::paths;
1212
use tracing::debug;
1313

14-
/// Bacially just normalizes a given path and converts it to a string.
14+
/// Basically just normalizes a given path and converts it to a string.
1515
fn render_filename<P: AsRef<Path>>(path: P, basedir: Option<&str>) -> CargoResult<String> {
1616
fn wrap_path(path: &Path) -> CargoResult<String> {
1717
path.to_str()

0 commit comments

Comments
 (0)