This commit is contained in:
Joseph T. Lyons
2021-01-01 23:24:32 -05:00
committed by GitHub
parent 7eb8634ad7
commit a5f7600f6f
24 changed files with 37 additions and 37 deletions

View File

@ -122,7 +122,7 @@ async fn benchmark(raw_args: CommandArgs) -> Result<OutputStream, ShellError> {
benchmark_output(indexmap, output, passthrough, &tag, &mut context).await
} else {
Err(ShellError::untagged_runtime_error(
"Could not retreive CPU time",
"Could not retrieve CPU time",
))
}
}

View File

@ -73,7 +73,7 @@ async fn process_row(
match replace_for {
Ok(s) => match convert_bytes_to_string_using_format(s, format) {
Ok(b) => OutputStream::one(ReturnSuccess::value(
input.replace_data_at_column_path(&field, b).expect("Given that the existance check was already done, this souldn't trigger never"),
input.replace_data_at_column_path(&field, b).expect("Given that the existence check was already done, this shouldn't trigger never"),
)),
Err(e) => OutputStream::one(Err(e)),
},

View File

@ -90,7 +90,7 @@ pub async fn histogram(args: CommandArgs) -> Result<OutputStream, ShellError> {
} else if let Some((key, _)) = columns[0].split_last() {
key.as_string()
} else {
"frecuency".to_string()
"frequency".to_string()
};
let column = if let Some(ref column) = column_grouper {
@ -149,7 +149,7 @@ pub async fn histogram(args: CommandArgs) -> Result<OutputStream, ShellError> {
.ok_or_else(|| {
ShellError::labeled_error(
"Unable to load group labels",
"unabled to load group labels",
"unable to load group labels",
&name,
)
})?

View File

@ -14,7 +14,7 @@ impl WholeStreamCommand for SubCommand {
}
fn signature(&self) -> Signature {
Signature::build("math celi")
Signature::build("math ceil")
}
fn usage(&self) -> &str {

View File

@ -120,7 +120,7 @@ pub fn compute_stddev(values: &[Value], n: usize, name: &Tag) -> Result<Value, S
_ => {
return Err(ShellError::labeled_error(
"Could not take square root of variance",
"error occured here",
"error occurred here",
name.span,
))
}
@ -129,7 +129,7 @@ pub fn compute_stddev(values: &[Value], n: usize, name: &Tag) -> Result<Value, S
Some(stddev) => Ok(UntaggedValue::from(Primitive::Decimal(stddev)).into_value(name)),
None => Err(ShellError::labeled_error(
"Could not calculate stddev",
"error occured here",
"error occurred here",
name.span,
)),
}

View File

@ -33,7 +33,7 @@ impl WholeStreamCommand for SubCommand {
SyntaxShape::ColumnPath,
"optionally find and replace text by column paths",
)
.switch("all", "replace all occurences of find string", Some('a'))
.switch("all", "replace all occurrences of find string", Some('a'))
}
fn usage(&self) -> &str {

View File

@ -80,7 +80,7 @@ impl Scope {
}
pub fn get_vars(&self) -> IndexMap<String, Value> {
//FIXME: should this be an interator?
//FIXME: should this be an iterator?
let mut output = IndexMap::new();
for frame in self.frames.lock().iter().rev() {
@ -93,7 +93,7 @@ impl Scope {
}
pub fn get_env_vars(&self) -> IndexMap<String, String> {
//FIXME: should this be an interator?
//FIXME: should this be an iterator?
let mut output = IndexMap::new();
for frame in self.frames.lock().iter().rev() {
@ -242,7 +242,7 @@ impl ScopeFrame {
// impl Scope {
// pub fn vars(&self) -> IndexMap<String, Value> {
// //FIXME: should this be an interator?
// //FIXME: should this be an iterator?
// let mut output = IndexMap::new();
@ -262,7 +262,7 @@ impl ScopeFrame {
// }
// pub fn env(&self) -> IndexMap<String, String> {
// //FIXME: should this be an interator?
// //FIXME: should this be an iterator?
// let mut output = IndexMap::new();

View File

@ -89,8 +89,8 @@ pub async fn process_script(
let name = args
.positional
.as_ref()
.and_then(|potionals| {
potionals.get(0).map(|e| {
.and_then(|positionals| {
positionals.get(0).map(|e| {
if let Expression::Literal(Literal::String(ref s)) = e.expr {
&s
} else {

View File

@ -265,7 +265,7 @@ impl ThemeColor {
match character {
b'0'..=b'9' => Ok(character - b'0'),
b'a'..=b'z' => Ok(character - (b'a' - 10)),
_ => Err(E::custom(format!("invalid charater {}", character))),
_ => Err(E::custom(format!("invalid character {}", character))),
}
}
}

View File

@ -47,7 +47,7 @@ fn flatten_nested_tables() {
}
#[test]
fn flatten_row_column_explictly() {
fn flatten_row_column_explicitly() {
Playground::setup("flatten_test_1", |dirs, sandbox| {
sandbox.with_files(vec![FileWithContentToBeTrimmed(
"katz.json",
@ -113,7 +113,7 @@ fn flatten_row_columns_having_same_column_names_flats_separately() {
}
#[test]
fn flatten_table_columns_explictly() {
fn flatten_table_columns_explicitly() {
Playground::setup("flatten_test_3", |dirs, sandbox| {
sandbox.with_files(vec![FileWithContentToBeTrimmed(
"katz.json",

View File

@ -30,7 +30,7 @@ fn add() {
}
#[test]
fn add_compount() {
fn add_compound() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"