From 3e93ae8af4b48ad8eb2451aea3cef63f6938c077 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Thu, 25 Nov 2021 17:11:20 +0000 Subject: [PATCH] Correct spelling (#4152) --- crates/README.md | 2 +- crates/nu-command/src/commands/platform/ansi/gradient.rs | 2 +- crates/nu-command/src/commands/strings/str_/trim/command.rs | 2 +- crates/nu-engine/src/evaluate/variables.rs | 2 +- crates/nu-engine/src/shell/palette.rs | 2 +- crates/nu-engine/src/types/deduction.rs | 2 +- crates/nu-parser/src/flag.rs | 2 +- crates/nu-parser/src/parse.rs | 2 +- crates/nu-path/src/dots.rs | 2 +- crates/nu-protocol/src/value/primitive.rs | 2 +- docs/howto_build_without_openssl.md | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/README.md b/crates/README.md index bf344b79..ca1e44bc 100644 --- a/crates/README.md +++ b/crates/README.md @@ -10,4 +10,4 @@ Foundational libraries are split into two kinds of crates: Plugins are likewise also split into two types: * Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features. -* Extra plugins - these plugins run a wide range of differnt capabilities like working with different file types, charting, viewing binary data, and more. +* Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more. diff --git a/crates/nu-command/src/commands/platform/ansi/gradient.rs b/crates/nu-command/src/commands/platform/ansi/gradient.rs index 391c1f33..d8433ca8 100644 --- a/crates/nu-command/src/commands/platform/ansi/gradient.rs +++ b/crates/nu-command/src/commands/platform/ansi/gradient.rs @@ -170,7 +170,7 @@ fn action( Ok(UntaggedValue::string(gradient_string).into_value(tag)) } (None, Some(fg_end), None, Some(bg_end)) => { - // missin fg_start and bg_start, so assume black + // missing fg_start and bg_start, so assume black let fg_start = Rgb::new(0, 0, 0); let bg_start = Rgb::new(0, 0, 0); let fg_gradient = Gradient::new(fg_start, fg_end); diff --git a/crates/nu-command/src/commands/strings/str_/trim/command.rs b/crates/nu-command/src/commands/strings/str_/trim/command.rs index 2d4d3e30..a0898acb 100644 --- a/crates/nu-command/src/commands/strings/str_/trim/command.rs +++ b/crates/nu-command/src/commands/strings/str_/trim/command.rs @@ -144,7 +144,7 @@ fn trim(s: &str, char_: Option, closure_flags: &ClosureFlags) -> String { let re_str = format!("{}{{2,}}", reg); // create the regex let re = regex::Regex::new(&re_str).expect("Error creating regular expression"); - // replace all mutliple occurances with single occurences represented by r + // replace all multiple occurrences with single occurrences represented by r let new_str = re.replace_all(&return_string, r.to_string()); // update the return string so the next loop has the latest changes return_string = new_str.to_string(); diff --git a/crates/nu-engine/src/evaluate/variables.rs b/crates/nu-engine/src/evaluate/variables.rs index 421cb71e..492b4afd 100644 --- a/crates/nu-engine/src/evaluate/variables.rs +++ b/crates/nu-engine/src/evaluate/variables.rs @@ -60,7 +60,7 @@ pub fn nu(scope: &Scope, ctx: &EvaluationContext) -> Result { // std::env::vars(), rather than the case-sensitive Environment.GetEnvironmentVariables() of .NET that PowerShell // uses. // - // For now, we work around the discrepency as best we can by merging the two into what is shown to the user as the + // For now, we work around the discrepancy as best we can by merging the two into what is shown to the user as the // 'path' column of `$nu` let mut table = vec![]; for v in env { diff --git a/crates/nu-engine/src/shell/palette.rs b/crates/nu-engine/src/shell/palette.rs index 7494b278..5ad93f58 100644 --- a/crates/nu-engine/src/shell/palette.rs +++ b/crates/nu-engine/src/shell/palette.rs @@ -238,7 +238,7 @@ impl Default for Theme { variable: ThemeColor(Color::Purple), whitespace: ThemeColor(Color::White), word: ThemeColor(Color::Green), - // These should really be Syles and not colors + // These should really be Styles and not colors // leave this here for the next change to make // ThemeColor, ThemeStyle. // open_delimiter: ThemeColor(Color::White.normal()), diff --git a/crates/nu-engine/src/types/deduction.rs b/crates/nu-engine/src/types/deduction.rs index 11a03491..79681191 100644 --- a/crates/nu-engine/src/types/deduction.rs +++ b/crates/nu-engine/src/types/deduction.rs @@ -597,7 +597,7 @@ impl VarSyntaxShapeDeductor { } Expression::Table(header, _rows) => { self.infer_shapes_in_table_header(header)?; - // Shapes within columns can be heterogenous as long as + // Shapes within columns can be heterogeneous as long as // https://github.com/nushell/rfcs/pull/3 // didn't land // self.infer_shapes_in_rows(_rows)?; diff --git a/crates/nu-parser/src/flag.rs b/crates/nu-parser/src/flag.rs index 8f05abb6..0c97bf34 100644 --- a/crates/nu-parser/src/flag.rs +++ b/crates/nu-parser/src/flag.rs @@ -132,7 +132,7 @@ mod tests { match spec { NamedType::Optional(_, _) => {} - _ => panic!("optional flag didn't parse succesfully"), + _ => panic!("optional flag didn't parse successfully"), } } } diff --git a/crates/nu-parser/src/parse.rs b/crates/nu-parser/src/parse.rs index ac550be5..a039cd9a 100644 --- a/crates/nu-parser/src/parse.rs +++ b/crates/nu-parser/src/parse.rs @@ -901,7 +901,7 @@ fn parse_arg( return parse_dollar_expr(lite_arg, scope); } - // before anything else, try to see if this is a number in paranthesis + // before anything else, try to see if this is a number in parenthesis if lite_arg.item.starts_with('(') { return parse_full_column_path(lite_arg, scope); } diff --git a/crates/nu-path/src/dots.rs b/crates/nu-path/src/dots.rs index b6025c47..0439b36d 100644 --- a/crates/nu-path/src/dots.rs +++ b/crates/nu-path/src/dots.rs @@ -19,7 +19,7 @@ fn handle_dots_push(string: &mut String, count: u8) { string.pop(); // remove last '/' } -/// Expands any occurence of more than two dots into a sequence of ../ (or ..\ on windows), e.g., +/// Expands any occurrence of more than two dots into a sequence of ../ (or ..\ on windows), e.g., /// "..." into "../..", "...." into "../../../", etc. pub fn expand_ndots(path: impl AsRef) -> PathBuf { // Check if path is valid UTF-8 and if not, return it as it is to avoid breaking it via string diff --git a/crates/nu-protocol/src/value/primitive.rs b/crates/nu-protocol/src/value/primitive.rs index c40c8668..b979df8c 100644 --- a/crates/nu-protocol/src/value/primitive.rs +++ b/crates/nu-protocol/src/value/primitive.rs @@ -290,7 +290,7 @@ impl Primitive { .expect("Internal error: conversion from u32 failed"), ); let secs = match secs.to_i64() { - //The duration crate doesnt accept seconds bigger than i64::MAX / 1000 + //The duration crate doesn't accept seconds bigger than i64::MAX / 1000 Some(secs) => match secs.checked_mul(1000) { Some(_) => secs, None => { diff --git a/docs/howto_build_without_openssl.md b/docs/howto_build_without_openssl.md index 939100b5..f0d2a791 100644 --- a/docs/howto_build_without_openssl.md +++ b/docs/howto_build_without_openssl.md @@ -2,7 +2,7 @@ You may find it desirable to compile nu shell without requiring an OpenSSL installation on your system. -You can do this by runnning: +You can do this by running: ```sh cargo build --no-default-features --features=rustyline-support ```