Fix typos by codespell (#7600)

# Description

Found via `codespell -S target -L
crate,ser,numer,falsy,ro,te,nd,bu,ndoes,statics,ons,fo,rouge,pard`

# User-Facing Changes

None.

# Tests + Formatting

None and done.

# After Submitting

None.
This commit is contained in:
Kian-Meng Ang
2022-12-26 15:31:26 +08:00
committed by GitHub
parent 2415381682
commit 79000aa5e0
39 changed files with 61 additions and 61 deletions

View File

@ -167,10 +167,10 @@ pub enum TableIndexMode {
pub enum TrimStrategy {
/// Wrapping strategy.
///
/// It it's simmilar to original nu_table, strategy.
/// It it's similar to original nu_table, strategy.
Wrap {
/// A flag which indicates whether is it necessary to try
/// to keep word bounderies.
/// to keep word boundaries.
try_to_keep_words: bool,
},
/// Truncating strategy, where we just cut the string.

View File

@ -177,7 +177,7 @@ impl EngineState {
.iter_mut()
.find(|(name, _)| name == &delta_name)
{
// Upating existing overlay
// Updating existing overlay
for item in delta_overlay.decls.into_iter() {
existing_overlay.decls.insert(item.0, item.1);
}

View File

@ -527,7 +527,7 @@ impl PipelineData {
let ctrlc = exit_code_stream.ctrlc.clone();
let exit_code: Vec<Value> = exit_code_stream.into_iter().collect();
if let Some(Value::Int { val: code, .. }) = exit_code.last() {
// if exit_code is not 0, it indicates error occured, return back Err.
// if exit_code is not 0, it indicates error occurred, return back Err.
if *code != 0 {
failed_to_run = true;
}
@ -564,7 +564,7 @@ impl PipelineData {
/// Consume and print self data immediately.
///
/// `no_newline` controls if we need to attach newline character to output.
/// `to_stderr` controls if data is output to stderr, when the value is false, the data is ouput to stdout.
/// `to_stderr` controls if data is output to stderr, when the value is false, the data is output to stdout.
pub fn print(
self,
engine_state: &EngineState,

View File

@ -123,7 +123,7 @@ pub struct Signature {
pub category: Category,
}
/// Fromat argumet type for user readable output.
/// Format argument type for user readable output.
///
/// In general:
/// if argument type is a simple type(like string), we'll wrapped with `<>`, the result will be `<string>`
@ -147,7 +147,7 @@ fn fmt_type(arg_type: &Type, optional: bool) -> String {
//
// <string> | <string>, <int?> => string
//
// More detail explaination:
// More detail explanation:
// the first one is the input from previous command, aka, pipeline input
// then followed by `|`, then positional arguments type
// then optional arguments type, which ends with `?`

View File

@ -699,7 +699,7 @@ impl Value {
let cols = cols.clone();
let span = *span;
// Make reverse iterate to avoid duplicate column leads to first value, actuall last value is expected.
// Make reverse iterate to avoid duplicate column leads to first value, actually last value is expected.
if let Some(found) = cols.iter().zip(vals.iter()).rev().find(|x| {
if insensitive {
x.0.to_lowercase() == column_name.to_lowercase()
@ -1613,7 +1613,7 @@ impl PartialOrd for Value {
..
} => {
// reorder cols and vals to make more logically compare.
// more genral, if two record have same col and values,
// more general, if two record have same col and values,
// the order of cols shouldn't affect the equal property.
let (lhs_cols_ordered, lhs_vals_ordered) =
reorder_record_inner(lhs_cols, lhs_vals);

View File

@ -179,7 +179,7 @@ impl Iterator for RawStream {
}
}
/// A potentially infinite stream of values, optinally with a mean to send a Ctrl-C signal to stop
/// A potentially infinite stream of values, optionally with a mean to send a Ctrl-C signal to stop
/// the stream from continuing.
///
/// In practice, a "stream" here means anything which can be iterated and produce Values as it iterates.