run rustfmt

This commit is contained in:
Maximilian Roos
2019-09-11 10:36:50 -04:00
parent f47349c1a0
commit 127381497c
34 changed files with 159 additions and 203 deletions

View File

@ -10,8 +10,7 @@ impl WholeStreamCommand for CD {
}
fn signature(&self) -> Signature {
Signature::build("cd")
.optional("directory", SyntaxType::Path)
Signature::build("cd").optional("directory", SyntaxType::Path)
}
fn usage(&self) -> &str {

View File

@ -1,5 +1,5 @@
use crate::errors::ShellError;
use crate::data::{Dictionary, Value};
use crate::errors::ShellError;
use crate::prelude::*;
use chrono::{DateTime, Local, Utc};

View File

@ -11,8 +11,7 @@ impl WholeStreamCommand for Exit {
}
fn signature(&self) -> Signature {
Signature::build("exit")
.switch("now")
Signature::build("exit").switch("now")
}
fn usage(&self) -> &str {

View File

@ -16,8 +16,7 @@ impl WholeStreamCommand for First {
}
fn signature(&self) -> Signature {
Signature::build("first")
.required("amount", SyntaxType::Literal)
Signature::build("first").required("amount", SyntaxType::Literal)
}
fn usage(&self) -> &str {

View File

@ -1,6 +1,6 @@
use crate::commands::WholeStreamCommand;
use crate::errors::ExpectedRange;
use crate::data::{Primitive, TaggedDictBuilder, Value};
use crate::errors::ExpectedRange;
use crate::prelude::*;
use bson::{decode_document, spec::BinarySubtype, Bson};
use std::str::FromStr;

View File

@ -1,6 +1,6 @@
use crate::commands::WholeStreamCommand;
use crate::errors::ShellError;
use crate::data::Value;
use crate::errors::ShellError;
use crate::prelude::*;
pub struct Get;

View File

@ -1,7 +1,7 @@
use crate::commands::command::CommandAction;
use crate::commands::PerItemCommand;
use crate::errors::ShellError;
use crate::data::{command_dict, TaggedDictBuilder};
use crate::errors::ShellError;
use crate::parser::registry;
use crate::prelude::*;

View File

@ -1,6 +1,6 @@
use crate::commands::WholeStreamCommand;
use crate::errors::ShellError;
use crate::data::{Primitive, Value};
use crate::errors::ShellError;
use crate::prelude::*;
use log::trace;

View File

@ -1,7 +1,7 @@
use crate::commands::WholeStreamCommand;
use crate::context::CommandRegistry;
use crate::errors::ShellError;
use crate::data::base::select_fields;
use crate::errors::ShellError;
use crate::prelude::*;
#[derive(Deserialize)]

View File

@ -1,7 +1,7 @@
use crate::commands::UnevaluatedCallInfo;
use crate::context::SpanSource;
use crate::errors::ShellError;
use crate::data::Value;
use crate::errors::ShellError;
use crate::parser::hir::SyntaxType;
use crate::parser::registry::Signature;
use crate::prelude::*;

View File

@ -1,6 +1,6 @@
use crate::commands::WholeStreamCommand;
use crate::errors::ShellError;
use crate::data::base::reject_fields;
use crate::errors::ShellError;
use crate::prelude::*;
#[derive(Deserialize)]

View File

@ -1,6 +1,6 @@
use crate::commands::{UnevaluatedCallInfo, WholeStreamCommand};
use crate::errors::ShellError;
use crate::data::Value;
use crate::errors::ShellError;
use crate::prelude::*;
use std::path::{Path, PathBuf};

View File

@ -1,6 +1,6 @@
use crate::commands::WholeStreamCommand;
use crate::errors::ShellError;
use crate::data::TaggedDictBuilder;
use crate::errors::ShellError;
use crate::prelude::*;
pub struct Shells;

View File

@ -1,6 +1,6 @@
use crate::commands::WholeStreamCommand;
use crate::errors::ShellError;
use crate::data::{TaggedDictBuilder, Value};
use crate::errors::ShellError;
use crate::prelude::*;
pub struct Size;

View File

@ -1,6 +1,6 @@
use crate::commands::WholeStreamCommand;
use crate::errors::ShellError;
use crate::data::{Primitive, TaggedDictBuilder, Value};
use crate::errors::ShellError;
use crate::prelude::*;
use log::trace;
@ -40,7 +40,11 @@ impl WholeStreamCommand for SplitColumn {
}
fn split_column(
SplitColumnArgs { separator, rest, collapse_empty}: SplitColumnArgs,
SplitColumnArgs {
separator,
rest,
collapse_empty,
}: SplitColumnArgs,
RunnableContext { input, name, .. }: RunnableContext,
) -> Result<OutputStream, ShellError> {
Ok(input

View File

@ -1,6 +1,6 @@
use crate::commands::WholeStreamCommand;
use crate::errors::ShellError;
use crate::data::{Primitive, Value};
use crate::errors::ShellError;
use crate::prelude::*;
use log::trace;
@ -17,8 +17,7 @@ impl WholeStreamCommand for SplitRow {
}
fn signature(&self) -> Signature {
Signature::build("split-row")
.required("separator", SyntaxType::Any)
Signature::build("split-row").required("separator", SyntaxType::Any)
}
fn usage(&self) -> &str {

View File

@ -1,6 +1,6 @@
use crate::commands::WholeStreamCommand;
use crate::errors::ShellError;
use crate::data::{TaggedDictBuilder, Value};
use crate::errors::ShellError;
use crate::prelude::*;
pub struct Tags;

View File

@ -1,6 +1,6 @@
use crate::commands::WholeStreamCommand;
use crate::errors::ShellError;
use crate::data::Value;
use crate::errors::ShellError;
use crate::prelude::*;
pub struct Trim;

View File

@ -1,6 +1,6 @@
use crate::commands::WholeStreamCommand;
use crate::errors::ShellError;
use crate::data::{Dictionary, Value};
use crate::errors::ShellError;
use crate::parser::registry::Signature;
use crate::prelude::*;
use indexmap::IndexMap;

View File

@ -12,8 +12,7 @@ impl PerItemCommand for Where {
}
fn signature(&self) -> registry::Signature {
Signature::build("where")
.required("condition", SyntaxType::Block)
Signature::build("where").required("condition", SyntaxType::Block)
}
fn usage(&self) -> &str {
@ -43,9 +42,7 @@ impl PerItemCommand for Where {
VecDeque::new()
}
}
Err(e) => {
return Err(e)
}
Err(e) => return Err(e),
}
}
Tagged { tag, .. } => {

View File

@ -1,5 +1,5 @@
use crate::errors::ShellError;
use crate::data::Value;
use crate::errors::ShellError;
use crate::prelude::*;
use crate::commands::WholeStreamCommand;
@ -13,8 +13,7 @@ impl WholeStreamCommand for Which {
}
fn signature(&self) -> Signature {
Signature::build("which")
.required("name", SyntaxType::Any)
Signature::build("which").required("name", SyntaxType::Any)
}
fn usage(&self) -> &str {