diff --git a/crates/nu-cli/src/commands/commandline/edit.rs b/crates/nu-cli/src/commands/commandline/edit.rs index 9afd52d946..7b51ba0002 100644 --- a/crates/nu-cli/src/commands/commandline/edit.rs +++ b/crates/nu-cli/src/commands/commandline/edit.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct CommandlineEdit; -impl Command for SubCommand { +impl Command for CommandlineEdit { fn name(&self) -> &str { "commandline edit" } diff --git a/crates/nu-cli/src/commands/commandline/get_cursor.rs b/crates/nu-cli/src/commands/commandline/get_cursor.rs index 7c49309702..61050f6ae3 100644 --- a/crates/nu-cli/src/commands/commandline/get_cursor.rs +++ b/crates/nu-cli/src/commands/commandline/get_cursor.rs @@ -2,9 +2,9 @@ use nu_engine::command_prelude::*; use unicode_segmentation::UnicodeSegmentation; #[derive(Clone)] -pub struct SubCommand; +pub struct CommandlineGetCursor; -impl Command for SubCommand { +impl Command for CommandlineGetCursor { fn name(&self) -> &str { "commandline get-cursor" } diff --git a/crates/nu-cli/src/commands/commandline/mod.rs b/crates/nu-cli/src/commands/commandline/mod.rs index d3991c0fa5..bb4c9b05e3 100644 --- a/crates/nu-cli/src/commands/commandline/mod.rs +++ b/crates/nu-cli/src/commands/commandline/mod.rs @@ -4,6 +4,6 @@ mod get_cursor; mod set_cursor; pub use commandline_::Commandline; -pub use edit::SubCommand as CommandlineEdit; -pub use get_cursor::SubCommand as CommandlineGetCursor; -pub use set_cursor::SubCommand as CommandlineSetCursor; +pub use edit::CommandlineEdit; +pub use get_cursor::CommandlineGetCursor; +pub use set_cursor::CommandlineSetCursor; diff --git a/crates/nu-cli/src/commands/commandline/set_cursor.rs b/crates/nu-cli/src/commands/commandline/set_cursor.rs index bf54674b44..012bd8c7a4 100644 --- a/crates/nu-cli/src/commands/commandline/set_cursor.rs +++ b/crates/nu-cli/src/commands/commandline/set_cursor.rs @@ -3,9 +3,9 @@ use nu_engine::command_prelude::*; use unicode_segmentation::UnicodeSegmentation; #[derive(Clone)] -pub struct SubCommand; +pub struct CommandlineSetCursor; -impl Command for SubCommand { +impl Command for CommandlineSetCursor { fn name(&self) -> &str { "commandline set-cursor" } diff --git a/crates/nu-cmd-extra/src/extra/math/arccos.rs b/crates/nu-cmd-extra/src/extra/math/arccos.rs index 229e7e4520..bf7dd18555 100644 --- a/crates/nu-cmd-extra/src/extra/math/arccos.rs +++ b/crates/nu-cmd-extra/src/extra/math/arccos.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathArcCos; -impl Command for SubCommand { +impl Command for MathArcCos { fn name(&self) -> &str { "math arccos" } @@ -114,6 +114,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathArcCos {}) } } diff --git a/crates/nu-cmd-extra/src/extra/math/arccosh.rs b/crates/nu-cmd-extra/src/extra/math/arccosh.rs index c15c72dc36..5f8a5f691f 100644 --- a/crates/nu-cmd-extra/src/extra/math/arccosh.rs +++ b/crates/nu-cmd-extra/src/extra/math/arccosh.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathArcCosH; -impl Command for SubCommand { +impl Command for MathArcCosH { fn name(&self) -> &str { "math arccosh" } @@ -100,6 +100,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathArcCosH {}) } } diff --git a/crates/nu-cmd-extra/src/extra/math/arcsin.rs b/crates/nu-cmd-extra/src/extra/math/arcsin.rs index b1f4438e2b..817438d2ff 100644 --- a/crates/nu-cmd-extra/src/extra/math/arcsin.rs +++ b/crates/nu-cmd-extra/src/extra/math/arcsin.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathArcSin; -impl Command for SubCommand { +impl Command for MathArcSin { fn name(&self) -> &str { "math arcsin" } @@ -115,6 +115,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathArcSin {}) } } diff --git a/crates/nu-cmd-extra/src/extra/math/arcsinh.rs b/crates/nu-cmd-extra/src/extra/math/arcsinh.rs index a2fce1f057..6faa2dda67 100644 --- a/crates/nu-cmd-extra/src/extra/math/arcsinh.rs +++ b/crates/nu-cmd-extra/src/extra/math/arcsinh.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathArcSinH; -impl Command for SubCommand { +impl Command for MathArcSinH { fn name(&self) -> &str { "math arcsinh" } @@ -88,6 +88,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathArcSinH {}) } } diff --git a/crates/nu-cmd-extra/src/extra/math/arctan.rs b/crates/nu-cmd-extra/src/extra/math/arctan.rs index f3bcc74150..17de98b1f9 100644 --- a/crates/nu-cmd-extra/src/extra/math/arctan.rs +++ b/crates/nu-cmd-extra/src/extra/math/arctan.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathArcTan; -impl Command for SubCommand { +impl Command for MathArcTan { fn name(&self) -> &str { "math arctan" } @@ -102,6 +102,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathArcTan {}) } } diff --git a/crates/nu-cmd-extra/src/extra/math/arctanh.rs b/crates/nu-cmd-extra/src/extra/math/arctanh.rs index bd01e7f101..97fb7274c9 100644 --- a/crates/nu-cmd-extra/src/extra/math/arctanh.rs +++ b/crates/nu-cmd-extra/src/extra/math/arctanh.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathArcTanH; -impl Command for SubCommand { +impl Command for MathArcTanH { fn name(&self) -> &str { "math arctanh" } @@ -101,6 +101,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathArcTanH {}) } } diff --git a/crates/nu-cmd-extra/src/extra/math/cos.rs b/crates/nu-cmd-extra/src/extra/math/cos.rs index 5ec0777edf..c5d776301f 100644 --- a/crates/nu-cmd-extra/src/extra/math/cos.rs +++ b/crates/nu-cmd-extra/src/extra/math/cos.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathCos; -impl Command for SubCommand { +impl Command for MathCos { fn name(&self) -> &str { "math cos" } @@ -108,6 +108,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathCos {}) } } diff --git a/crates/nu-cmd-extra/src/extra/math/cosh.rs b/crates/nu-cmd-extra/src/extra/math/cosh.rs index 68bdc6094a..46ec992562 100644 --- a/crates/nu-cmd-extra/src/extra/math/cosh.rs +++ b/crates/nu-cmd-extra/src/extra/math/cosh.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathCosH; -impl Command for SubCommand { +impl Command for MathCosH { fn name(&self) -> &str { "math cosh" } @@ -88,6 +88,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathCosH {}) } } diff --git a/crates/nu-cmd-extra/src/extra/math/exp.rs b/crates/nu-cmd-extra/src/extra/math/exp.rs index 0b28274dae..b8954bd26c 100644 --- a/crates/nu-cmd-extra/src/extra/math/exp.rs +++ b/crates/nu-cmd-extra/src/extra/math/exp.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathExp; -impl Command for SubCommand { +impl Command for MathExp { fn name(&self) -> &str { "math exp" } @@ -93,6 +93,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathExp {}) } } diff --git a/crates/nu-cmd-extra/src/extra/math/ln.rs b/crates/nu-cmd-extra/src/extra/math/ln.rs index 147f536028..60890faeed 100644 --- a/crates/nu-cmd-extra/src/extra/math/ln.rs +++ b/crates/nu-cmd-extra/src/extra/math/ln.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathLn; -impl Command for SubCommand { +impl Command for MathLn { fn name(&self) -> &str { "math ln" } @@ -100,6 +100,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathLn {}) } } diff --git a/crates/nu-cmd-extra/src/extra/math/mod.rs b/crates/nu-cmd-extra/src/extra/math/mod.rs index 6da13a181c..239a57d8c1 100644 --- a/crates/nu-cmd-extra/src/extra/math/mod.rs +++ b/crates/nu-cmd-extra/src/extra/math/mod.rs @@ -15,19 +15,19 @@ mod arcsinh; mod arctan; mod arctanh; -pub use cos::SubCommand as MathCos; -pub use cosh::SubCommand as MathCosH; -pub use sin::SubCommand as MathSin; -pub use sinh::SubCommand as MathSinH; -pub use tan::SubCommand as MathTan; -pub use tanh::SubCommand as MathTanH; +pub use cos::MathCos; +pub use cosh::MathCosH; +pub use sin::MathSin; +pub use sinh::MathSinH; +pub use tan::MathTan; +pub use tanh::MathTanH; -pub use exp::SubCommand as MathExp; -pub use ln::SubCommand as MathLn; +pub use exp::MathExp; +pub use ln::MathLn; -pub use arccos::SubCommand as MathArcCos; -pub use arccosh::SubCommand as MathArcCosH; -pub use arcsin::SubCommand as MathArcSin; -pub use arcsinh::SubCommand as MathArcSinH; -pub use arctan::SubCommand as MathArcTan; -pub use arctanh::SubCommand as MathArcTanH; +pub use arccos::MathArcCos; +pub use arccosh::MathArcCosH; +pub use arcsin::MathArcSin; +pub use arcsinh::MathArcSinH; +pub use arctan::MathArcTan; +pub use arctanh::MathArcTanH; diff --git a/crates/nu-cmd-extra/src/extra/math/sin.rs b/crates/nu-cmd-extra/src/extra/math/sin.rs index fcaa693b8d..e22dea8ba9 100644 --- a/crates/nu-cmd-extra/src/extra/math/sin.rs +++ b/crates/nu-cmd-extra/src/extra/math/sin.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathSin; -impl Command for SubCommand { +impl Command for MathSin { fn name(&self) -> &str { "math sin" } @@ -108,6 +108,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathSin {}) } } diff --git a/crates/nu-cmd-extra/src/extra/math/sinh.rs b/crates/nu-cmd-extra/src/extra/math/sinh.rs index 2e852e42f1..3ac7d8fd98 100644 --- a/crates/nu-cmd-extra/src/extra/math/sinh.rs +++ b/crates/nu-cmd-extra/src/extra/math/sinh.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathSinH; -impl Command for SubCommand { +impl Command for MathSinH { fn name(&self) -> &str { "math sinh" } @@ -87,6 +87,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathSinH {}) } } diff --git a/crates/nu-cmd-extra/src/extra/math/tan.rs b/crates/nu-cmd-extra/src/extra/math/tan.rs index 025b9817c5..81a81aaadf 100644 --- a/crates/nu-cmd-extra/src/extra/math/tan.rs +++ b/crates/nu-cmd-extra/src/extra/math/tan.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathTan; -impl Command for SubCommand { +impl Command for MathTan { fn name(&self) -> &str { "math tan" } @@ -106,6 +106,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathTan {}) } } diff --git a/crates/nu-cmd-extra/src/extra/math/tanh.rs b/crates/nu-cmd-extra/src/extra/math/tanh.rs index 9ac10444d9..1a097370b1 100644 --- a/crates/nu-cmd-extra/src/extra/math/tanh.rs +++ b/crates/nu-cmd-extra/src/extra/math/tanh.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathTanH; -impl Command for SubCommand { +impl Command for MathTanH { fn name(&self) -> &str { "math tanh" } @@ -86,6 +86,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathTanH {}) } } diff --git a/crates/nu-cmd-extra/src/extra/strings/str_/case/camel_case.rs b/crates/nu-cmd-extra/src/extra/strings/str_/case/camel_case.rs index 279e3a7bb5..a2809bde54 100644 --- a/crates/nu-cmd-extra/src/extra/strings/str_/case/camel_case.rs +++ b/crates/nu-cmd-extra/src/extra/strings/str_/case/camel_case.rs @@ -3,9 +3,9 @@ use heck::ToLowerCamelCase; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct StrCamelCase; -impl Command for SubCommand { +impl Command for StrCamelCase { fn name(&self) -> &str { "str camel-case" } @@ -91,6 +91,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrCamelCase {}) } } diff --git a/crates/nu-cmd-extra/src/extra/strings/str_/case/kebab_case.rs b/crates/nu-cmd-extra/src/extra/strings/str_/case/kebab_case.rs index 89a3429d7a..61ba7d8b68 100644 --- a/crates/nu-cmd-extra/src/extra/strings/str_/case/kebab_case.rs +++ b/crates/nu-cmd-extra/src/extra/strings/str_/case/kebab_case.rs @@ -3,9 +3,9 @@ use heck::ToKebabCase; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct StrKebabCase; -impl Command for SubCommand { +impl Command for StrKebabCase { fn name(&self) -> &str { "str kebab-case" } @@ -90,6 +90,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrKebabCase {}) } } diff --git a/crates/nu-cmd-extra/src/extra/strings/str_/case/mod.rs b/crates/nu-cmd-extra/src/extra/strings/str_/case/mod.rs index bfa54921e2..93a681e95f 100644 --- a/crates/nu-cmd-extra/src/extra/strings/str_/case/mod.rs +++ b/crates/nu-cmd-extra/src/extra/strings/str_/case/mod.rs @@ -6,13 +6,13 @@ mod snake_case; mod str_; mod title_case; -pub use camel_case::SubCommand as StrCamelCase; -pub use kebab_case::SubCommand as StrKebabCase; -pub use pascal_case::SubCommand as StrPascalCase; -pub use screaming_snake_case::SubCommand as StrScreamingSnakeCase; -pub use snake_case::SubCommand as StrSnakeCase; +pub use camel_case::StrCamelCase; +pub use kebab_case::StrKebabCase; +pub use pascal_case::StrPascalCase; +pub use screaming_snake_case::StrScreamingSnakeCase; +pub use snake_case::StrSnakeCase; pub use str_::Str; -pub use title_case::SubCommand as StrTitleCase; +pub use title_case::StrTitleCase; use nu_cmd_base::input_handler::{operate as general_operate, CmdArgument}; use nu_engine::command_prelude::*; diff --git a/crates/nu-cmd-extra/src/extra/strings/str_/case/pascal_case.rs b/crates/nu-cmd-extra/src/extra/strings/str_/case/pascal_case.rs index 9d081fa314..ff15ceeebd 100644 --- a/crates/nu-cmd-extra/src/extra/strings/str_/case/pascal_case.rs +++ b/crates/nu-cmd-extra/src/extra/strings/str_/case/pascal_case.rs @@ -3,9 +3,9 @@ use heck::ToUpperCamelCase; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct StrPascalCase; -impl Command for SubCommand { +impl Command for StrPascalCase { fn name(&self) -> &str { "str pascal-case" } @@ -91,6 +91,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrPascalCase {}) } } diff --git a/crates/nu-cmd-extra/src/extra/strings/str_/case/screaming_snake_case.rs b/crates/nu-cmd-extra/src/extra/strings/str_/case/screaming_snake_case.rs index aa8d55fd48..ef552544d2 100644 --- a/crates/nu-cmd-extra/src/extra/strings/str_/case/screaming_snake_case.rs +++ b/crates/nu-cmd-extra/src/extra/strings/str_/case/screaming_snake_case.rs @@ -3,9 +3,9 @@ use heck::ToShoutySnakeCase; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct StrScreamingSnakeCase; -impl Command for SubCommand { +impl Command for StrScreamingSnakeCase { fn name(&self) -> &str { "str screaming-snake-case" } @@ -91,6 +91,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrScreamingSnakeCase {}) } } diff --git a/crates/nu-cmd-extra/src/extra/strings/str_/case/snake_case.rs b/crates/nu-cmd-extra/src/extra/strings/str_/case/snake_case.rs index f2d5fb61c7..a3913ebb30 100644 --- a/crates/nu-cmd-extra/src/extra/strings/str_/case/snake_case.rs +++ b/crates/nu-cmd-extra/src/extra/strings/str_/case/snake_case.rs @@ -3,9 +3,9 @@ use heck::ToSnakeCase; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct StrSnakeCase; -impl Command for SubCommand { +impl Command for StrSnakeCase { fn name(&self) -> &str { "str snake-case" } @@ -91,6 +91,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrSnakeCase {}) } } diff --git a/crates/nu-cmd-extra/src/extra/strings/str_/case/title_case.rs b/crates/nu-cmd-extra/src/extra/strings/str_/case/title_case.rs index 827a3dd594..7f83059538 100644 --- a/crates/nu-cmd-extra/src/extra/strings/str_/case/title_case.rs +++ b/crates/nu-cmd-extra/src/extra/strings/str_/case/title_case.rs @@ -3,9 +3,9 @@ use heck::ToTitleCase; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct StrTitleCase; -impl Command for SubCommand { +impl Command for StrTitleCase { fn name(&self) -> &str { "str title-case" } @@ -86,6 +86,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrTitleCase {}) } } diff --git a/crates/nu-command/src/conversions/into/binary.rs b/crates/nu-command/src/conversions/into/binary.rs index 3993f65d19..3a9c6077ab 100644 --- a/crates/nu-command/src/conversions/into/binary.rs +++ b/crates/nu-command/src/conversions/into/binary.rs @@ -13,9 +13,9 @@ impl CmdArgument for Arguments { } #[derive(Clone)] -pub struct SubCommand; +pub struct IntoBinary; -impl Command for SubCommand { +impl Command for IntoBinary { fn name(&self) -> &str { "into binary" } @@ -204,7 +204,7 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(IntoBinary {}) } #[rstest] diff --git a/crates/nu-command/src/conversions/into/bool.rs b/crates/nu-command/src/conversions/into/bool.rs index d093e69ad8..b2de275497 100644 --- a/crates/nu-command/src/conversions/into/bool.rs +++ b/crates/nu-command/src/conversions/into/bool.rs @@ -2,9 +2,9 @@ use nu_cmd_base::input_handler::{operate, CmdArgument}; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct IntoBool; -impl Command for SubCommand { +impl Command for IntoBool { fn name(&self) -> &str { "into bool" } @@ -202,7 +202,7 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(IntoBool {}) } #[test] diff --git a/crates/nu-command/src/conversions/into/datetime.rs b/crates/nu-command/src/conversions/into/datetime.rs index 54930bbc45..076571f085 100644 --- a/crates/nu-command/src/conversions/into/datetime.rs +++ b/crates/nu-command/src/conversions/into/datetime.rs @@ -49,9 +49,9 @@ impl Zone { } #[derive(Clone)] -pub struct SubCommand; +pub struct IntoDatetime; -impl Command for SubCommand { +impl Command for IntoDatetime { fn name(&self) -> &str { "into datetime" } @@ -495,14 +495,14 @@ fn list_human_readable_examples(span: Span) -> Value { #[cfg(test)] mod tests { use super::*; - use super::{action, DatetimeFormat, SubCommand, Zone}; + use super::{action, DatetimeFormat, IntoDatetime, Zone}; use nu_protocol::Type::Error; #[test] fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(IntoDatetime {}) } #[test] diff --git a/crates/nu-command/src/conversions/into/duration.rs b/crates/nu-command/src/conversions/into/duration.rs index 3d11b83afb..129188f839 100644 --- a/crates/nu-command/src/conversions/into/duration.rs +++ b/crates/nu-command/src/conversions/into/duration.rs @@ -4,9 +4,9 @@ use nu_protocol::{ast::Expr, Unit}; const NS_PER_SEC: i64 = 1_000_000_000; #[derive(Clone)] -pub struct SubCommand; +pub struct IntoDuration; -impl Command for SubCommand { +impl Command for IntoDuration { fn name(&self) -> &str { "into duration" } @@ -277,7 +277,7 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(IntoDuration {}) } const NS_PER_SEC: i64 = 1_000_000_000; diff --git a/crates/nu-command/src/conversions/into/filesize.rs b/crates/nu-command/src/conversions/into/filesize.rs index 98b63597e7..90f4c1a208 100644 --- a/crates/nu-command/src/conversions/into/filesize.rs +++ b/crates/nu-command/src/conversions/into/filesize.rs @@ -4,9 +4,9 @@ use nu_engine::command_prelude::*; use nu_utils::get_system_locale; #[derive(Clone)] -pub struct SubCommand; +pub struct IntoFilesize; -impl Command for SubCommand { +impl Command for IntoFilesize { fn name(&self) -> &str { "into filesize" } @@ -197,6 +197,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(IntoFilesize {}) } } diff --git a/crates/nu-command/src/conversions/into/float.rs b/crates/nu-command/src/conversions/into/float.rs index 23ada8c5a9..24f79d3204 100644 --- a/crates/nu-command/src/conversions/into/float.rs +++ b/crates/nu-command/src/conversions/into/float.rs @@ -2,9 +2,9 @@ use nu_cmd_base::input_handler::{operate, CellPathOnlyArgs}; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct IntoFloat; -impl Command for SubCommand { +impl Command for IntoFloat { fn name(&self) -> &str { "into float" } @@ -134,7 +134,7 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(IntoFloat {}) } #[test] diff --git a/crates/nu-command/src/conversions/into/glob.rs b/crates/nu-command/src/conversions/into/glob.rs index e935476900..040e073089 100644 --- a/crates/nu-command/src/conversions/into/glob.rs +++ b/crates/nu-command/src/conversions/into/glob.rs @@ -12,9 +12,9 @@ impl CmdArgument for Arguments { } #[derive(Clone)] -pub struct SubCommand; +pub struct IntoGlob; -impl Command for SubCommand { +impl Command for IntoGlob { fn name(&self) -> &str { "into glob" } @@ -121,6 +121,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(IntoGlob {}) } } diff --git a/crates/nu-command/src/conversions/into/int.rs b/crates/nu-command/src/conversions/into/int.rs index 67cba23090..4c3a53dbce 100644 --- a/crates/nu-command/src/conversions/into/int.rs +++ b/crates/nu-command/src/conversions/into/int.rs @@ -18,9 +18,9 @@ impl CmdArgument for Arguments { } #[derive(Clone)] -pub struct SubCommand; +pub struct IntoInt; -impl Command for SubCommand { +impl Command for IntoInt { fn name(&self) -> &str { "into int" } @@ -521,7 +521,7 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(IntoInt {}) } #[test] diff --git a/crates/nu-command/src/conversions/into/mod.rs b/crates/nu-command/src/conversions/into/mod.rs index 50258c338a..9f975efc78 100644 --- a/crates/nu-command/src/conversions/into/mod.rs +++ b/crates/nu-command/src/conversions/into/mod.rs @@ -12,16 +12,16 @@ mod record; mod string; mod value; -pub use self::bool::SubCommand as IntoBool; -pub use self::filesize::SubCommand as IntoFilesize; -pub use binary::SubCommand as IntoBinary; +pub use binary::IntoBinary; +pub use bool::IntoBool; pub use cell_path::IntoCellPath; pub use command::Into; -pub use datetime::SubCommand as IntoDatetime; -pub use duration::SubCommand as IntoDuration; -pub use float::SubCommand as IntoFloat; -pub use glob::SubCommand as IntoGlob; -pub use int::SubCommand as IntoInt; -pub use record::SubCommand as IntoRecord; -pub use string::SubCommand as IntoString; +pub use datetime::IntoDatetime; +pub use duration::IntoDuration; +pub use filesize::IntoFilesize; +pub use float::IntoFloat; +pub use glob::IntoGlob; +pub use int::IntoInt; +pub use record::IntoRecord; +pub use string::IntoString; pub use value::IntoValue; diff --git a/crates/nu-command/src/conversions/into/record.rs b/crates/nu-command/src/conversions/into/record.rs index fea5fe1e4e..bba7dc9d7c 100644 --- a/crates/nu-command/src/conversions/into/record.rs +++ b/crates/nu-command/src/conversions/into/record.rs @@ -3,9 +3,9 @@ use nu_engine::command_prelude::*; use nu_protocol::format_duration_as_timeperiod; #[derive(Clone)] -pub struct SubCommand; +pub struct IntoRecord; -impl Command for SubCommand { +impl Command for IntoRecord { fn name(&self) -> &str { "into record" } @@ -243,6 +243,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(IntoRecord {}) } } diff --git a/crates/nu-command/src/conversions/into/string.rs b/crates/nu-command/src/conversions/into/string.rs index 42eabc8935..cc48754361 100644 --- a/crates/nu-command/src/conversions/into/string.rs +++ b/crates/nu-command/src/conversions/into/string.rs @@ -19,9 +19,9 @@ impl CmdArgument for Arguments { } #[derive(Clone)] -pub struct SubCommand; +pub struct IntoString; -impl Command for SubCommand { +impl Command for IntoString { fn name(&self) -> &str { "into string" } @@ -316,6 +316,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(IntoString {}) } } diff --git a/crates/nu-command/src/conversions/mod.rs b/crates/nu-command/src/conversions/mod.rs index b67c77936f..52f589219d 100644 --- a/crates/nu-command/src/conversions/mod.rs +++ b/crates/nu-command/src/conversions/mod.rs @@ -4,4 +4,4 @@ mod split_cell_path; pub use fill::Fill; pub use into::*; -pub use split_cell_path::SubCommand as SplitCellPath; +pub use split_cell_path::SplitCellPath; diff --git a/crates/nu-command/src/conversions/split_cell_path.rs b/crates/nu-command/src/conversions/split_cell_path.rs index 27c457b356..4ff5bff67c 100644 --- a/crates/nu-command/src/conversions/split_cell_path.rs +++ b/crates/nu-command/src/conversions/split_cell_path.rs @@ -2,9 +2,9 @@ use nu_engine::command_prelude::*; use nu_protocol::{ast::PathMember, IntoValue}; #[derive(Clone)] -pub struct SubCommand; +pub struct SplitCellPath; -impl Command for SubCommand { +impl Command for SplitCellPath { fn name(&self) -> &str { "split cell-path" } @@ -150,6 +150,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(SplitCellPath {}) } } diff --git a/crates/nu-command/src/date/humanize.rs b/crates/nu-command/src/date/humanize.rs index 3f3300a94d..5670d1faed 100644 --- a/crates/nu-command/src/date/humanize.rs +++ b/crates/nu-command/src/date/humanize.rs @@ -4,9 +4,9 @@ use chrono_humanize::HumanTime; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct DateHumanize; -impl Command for SubCommand { +impl Command for DateHumanize { fn name(&self) -> &str { "date humanize" } @@ -101,6 +101,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(DateHumanize {}) } } diff --git a/crates/nu-command/src/date/list_timezone.rs b/crates/nu-command/src/date/list_timezone.rs index 6b7c448af2..3b7bb41eae 100644 --- a/crates/nu-command/src/date/list_timezone.rs +++ b/crates/nu-command/src/date/list_timezone.rs @@ -2,9 +2,9 @@ use chrono_tz::TZ_VARIANTS; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct DateListTimezones; -impl Command for SubCommand { +impl Command for DateListTimezones { fn name(&self) -> &str { "date list-timezone" } diff --git a/crates/nu-command/src/date/mod.rs b/crates/nu-command/src/date/mod.rs index fc0aaf95c0..385420c911 100644 --- a/crates/nu-command/src/date/mod.rs +++ b/crates/nu-command/src/date/mod.rs @@ -7,8 +7,8 @@ mod to_timezone; mod utils; pub use date_::Date; -pub use humanize::SubCommand as DateHumanize; -pub use list_timezone::SubCommand as DateListTimezones; -pub use now::SubCommand as DateNow; -pub use to_timezone::SubCommand as DateToTimezone; +pub use humanize::DateHumanize; +pub use list_timezone::DateListTimezones; +pub use now::DateNow; +pub use to_timezone::DateToTimezone; pub(crate) use utils::{generate_strftime_list, parse_date_from_string}; diff --git a/crates/nu-command/src/date/now.rs b/crates/nu-command/src/date/now.rs index 5492db9863..b3fca4ade2 100644 --- a/crates/nu-command/src/date/now.rs +++ b/crates/nu-command/src/date/now.rs @@ -2,9 +2,9 @@ use chrono::Local; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct DateNow; -impl Command for SubCommand { +impl Command for DateNow { fn name(&self) -> &str { "date now" } diff --git a/crates/nu-command/src/date/to_timezone.rs b/crates/nu-command/src/date/to_timezone.rs index e5e354f9cc..891d80805c 100644 --- a/crates/nu-command/src/date/to_timezone.rs +++ b/crates/nu-command/src/date/to_timezone.rs @@ -4,9 +4,9 @@ use chrono::{DateTime, FixedOffset, Local, LocalResult, TimeZone}; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct DateToTimezone; -impl Command for SubCommand { +impl Command for DateToTimezone { fn name(&self) -> &str { "date to-timezone" } @@ -147,6 +147,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(DateToTimezone {}) } } diff --git a/crates/nu-command/src/math/abs.rs b/crates/nu-command/src/math/abs.rs index 95cf251abb..4fae0633c8 100644 --- a/crates/nu-command/src/math/abs.rs +++ b/crates/nu-command/src/math/abs.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathAbs; -impl Command for SubCommand { +impl Command for MathAbs { fn name(&self) -> &str { "math abs" } @@ -105,6 +105,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathAbs {}) } } diff --git a/crates/nu-command/src/math/avg.rs b/crates/nu-command/src/math/avg.rs index a7f6d3088a..68e2de0a15 100644 --- a/crates/nu-command/src/math/avg.rs +++ b/crates/nu-command/src/math/avg.rs @@ -6,9 +6,9 @@ use nu_engine::command_prelude::*; const NS_PER_SEC: i64 = 1_000_000_000; #[derive(Clone)] -pub struct SubCommand; +pub struct MathAvg; -impl Command for SubCommand { +impl Command for MathAvg { fn name(&self) -> &str { "math avg" } @@ -104,6 +104,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathAvg {}) } } diff --git a/crates/nu-command/src/math/ceil.rs b/crates/nu-command/src/math/ceil.rs index a971ef3975..5867f21bca 100644 --- a/crates/nu-command/src/math/ceil.rs +++ b/crates/nu-command/src/math/ceil.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathCeil; -impl Command for SubCommand { +impl Command for MathCeil { fn name(&self) -> &str { "math ceil" } @@ -103,6 +103,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathCeil {}) } } diff --git a/crates/nu-command/src/math/floor.rs b/crates/nu-command/src/math/floor.rs index 2dfa293b24..2bc705f926 100644 --- a/crates/nu-command/src/math/floor.rs +++ b/crates/nu-command/src/math/floor.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathFloor; -impl Command for SubCommand { +impl Command for MathFloor { fn name(&self) -> &str { "math floor" } @@ -103,6 +103,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathFloor {}) } } diff --git a/crates/nu-command/src/math/log.rs b/crates/nu-command/src/math/log.rs index daf231a497..79eed71640 100644 --- a/crates/nu-command/src/math/log.rs +++ b/crates/nu-command/src/math/log.rs @@ -2,9 +2,9 @@ use nu_engine::command_prelude::*; use nu_protocol::Signals; #[derive(Clone)] -pub struct SubCommand; +pub struct MathLog; -impl Command for SubCommand { +impl Command for MathLog { fn name(&self) -> &str { "math log" } @@ -159,6 +159,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathLog {}) } } diff --git a/crates/nu-command/src/math/max.rs b/crates/nu-command/src/math/max.rs index 2ee7f89b15..1cbd5e555e 100644 --- a/crates/nu-command/src/math/max.rs +++ b/crates/nu-command/src/math/max.rs @@ -5,9 +5,9 @@ use crate::math::{ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathMax; -impl Command for SubCommand { +impl Command for MathMax { fn name(&self) -> &str { "math max" } @@ -97,6 +97,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathMax {}) } } diff --git a/crates/nu-command/src/math/median.rs b/crates/nu-command/src/math/median.rs index 7b88fab346..ae1471cadf 100644 --- a/crates/nu-command/src/math/median.rs +++ b/crates/nu-command/src/math/median.rs @@ -3,9 +3,9 @@ use nu_engine::command_prelude::*; use std::cmp::Ordering; #[derive(Clone)] -pub struct SubCommand; +pub struct MathMedian; -impl Command for SubCommand { +impl Command for MathMedian { fn name(&self) -> &str { "math median" } @@ -151,6 +151,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathMedian {}) } } diff --git a/crates/nu-command/src/math/min.rs b/crates/nu-command/src/math/min.rs index 6722575579..85d1de68f1 100644 --- a/crates/nu-command/src/math/min.rs +++ b/crates/nu-command/src/math/min.rs @@ -5,9 +5,9 @@ use crate::math::{ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathMin; -impl Command for SubCommand { +impl Command for MathMin { fn name(&self) -> &str { "math min" } @@ -95,6 +95,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathMin {}) } } diff --git a/crates/nu-command/src/math/mod.rs b/crates/nu-command/src/math/mod.rs index 97828c8b86..b0e1c68f2f 100644 --- a/crates/nu-command/src/math/mod.rs +++ b/crates/nu-command/src/math/mod.rs @@ -17,20 +17,20 @@ mod sum; mod utils; mod variance; -pub use abs::SubCommand as MathAbs; -pub use avg::SubCommand as MathAvg; -pub use ceil::SubCommand as MathCeil; -pub use floor::SubCommand as MathFloor; +pub use abs::MathAbs; +pub use avg::MathAvg; +pub use ceil::MathCeil; +pub use floor::MathFloor; pub use math_::MathCommand as Math; -pub use max::SubCommand as MathMax; -pub use median::SubCommand as MathMedian; -pub use min::SubCommand as MathMin; -pub use mode::SubCommand as MathMode; -pub use product::SubCommand as MathProduct; -pub use round::SubCommand as MathRound; -pub use sqrt::SubCommand as MathSqrt; -pub use stddev::SubCommand as MathStddev; -pub use sum::SubCommand as MathSum; -pub use variance::SubCommand as MathVariance; +pub use max::MathMax; +pub use median::MathMedian; +pub use min::MathMin; +pub use mode::MathMode; +pub use product::MathProduct; +pub use round::MathRound; +pub use sqrt::MathSqrt; +pub use stddev::MathStddev; +pub use sum::MathSum; +pub use variance::MathVariance; -pub use self::log::SubCommand as MathLog; +pub use log::MathLog; diff --git a/crates/nu-command/src/math/mode.rs b/crates/nu-command/src/math/mode.rs index 6f42d0bfd5..5183a855a9 100644 --- a/crates/nu-command/src/math/mode.rs +++ b/crates/nu-command/src/math/mode.rs @@ -3,7 +3,7 @@ use nu_engine::command_prelude::*; use std::{cmp::Ordering, collections::HashMap}; #[derive(Clone)] -pub struct SubCommand; +pub struct MathMode; #[derive(Hash, Eq, PartialEq, Debug)] enum NumberTypes { @@ -28,7 +28,7 @@ impl HashableType { } } -impl Command for SubCommand { +impl Command for MathMode { fn name(&self) -> &str { "math mode" } @@ -183,6 +183,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathMode {}) } } diff --git a/crates/nu-command/src/math/product.rs b/crates/nu-command/src/math/product.rs index 41e100b154..c4560601aa 100644 --- a/crates/nu-command/src/math/product.rs +++ b/crates/nu-command/src/math/product.rs @@ -5,9 +5,9 @@ use crate::math::{ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathProduct; -impl Command for SubCommand { +impl Command for MathProduct { fn name(&self) -> &str { "math product" } @@ -88,6 +88,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathProduct {}) } } diff --git a/crates/nu-command/src/math/round.rs b/crates/nu-command/src/math/round.rs index aeb92002c0..558715e675 100644 --- a/crates/nu-command/src/math/round.rs +++ b/crates/nu-command/src/math/round.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathRound; -impl Command for SubCommand { +impl Command for MathRound { fn name(&self) -> &str { "math round" } @@ -153,6 +153,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathRound {}) } } diff --git a/crates/nu-command/src/math/sqrt.rs b/crates/nu-command/src/math/sqrt.rs index b8f982a540..38b2a4d800 100644 --- a/crates/nu-command/src/math/sqrt.rs +++ b/crates/nu-command/src/math/sqrt.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathSqrt; -impl Command for SubCommand { +impl Command for MathSqrt { fn name(&self) -> &str { "math sqrt" } @@ -127,6 +127,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathSqrt {}) } } diff --git a/crates/nu-command/src/math/stddev.rs b/crates/nu-command/src/math/stddev.rs index 1e10cedf41..051f7d02d7 100644 --- a/crates/nu-command/src/math/stddev.rs +++ b/crates/nu-command/src/math/stddev.rs @@ -3,9 +3,9 @@ use crate::math::utils::run_with_function; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathStddev; -impl Command for SubCommand { +impl Command for MathStddev { fn name(&self) -> &str { "math stddev" } @@ -111,6 +111,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathStddev {}) } } diff --git a/crates/nu-command/src/math/sum.rs b/crates/nu-command/src/math/sum.rs index 30bc71bb7a..8cae85c3a8 100644 --- a/crates/nu-command/src/math/sum.rs +++ b/crates/nu-command/src/math/sum.rs @@ -5,9 +5,9 @@ use crate::math::{ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathSum; -impl Command for SubCommand { +impl Command for MathSum { fn name(&self) -> &str { "math sum" } @@ -94,6 +94,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathSum {}) } } diff --git a/crates/nu-command/src/math/variance.rs b/crates/nu-command/src/math/variance.rs index 91128e36cd..b221d92746 100644 --- a/crates/nu-command/src/math/variance.rs +++ b/crates/nu-command/src/math/variance.rs @@ -2,9 +2,9 @@ use crate::math::utils::run_with_function; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct MathVariance; -impl Command for SubCommand { +impl Command for MathVariance { fn name(&self) -> &str { "math variance" } @@ -135,6 +135,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(MathVariance {}) } } diff --git a/crates/nu-command/src/network/http/delete.rs b/crates/nu-command/src/network/http/delete.rs index 8a931f3653..f46c16b584 100644 --- a/crates/nu-command/src/network/http/delete.rs +++ b/crates/nu-command/src/network/http/delete.rs @@ -6,9 +6,9 @@ use crate::network::http::client::{ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct HttpDelete; -impl Command for SubCommand { +impl Command for HttpDelete { fn name(&self) -> &str { "http delete" } @@ -248,6 +248,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(HttpDelete {}) } } diff --git a/crates/nu-command/src/network/http/get.rs b/crates/nu-command/src/network/http/get.rs index 245ba3747c..f317b4b080 100644 --- a/crates/nu-command/src/network/http/get.rs +++ b/crates/nu-command/src/network/http/get.rs @@ -8,9 +8,9 @@ use nu_engine::command_prelude::*; use super::client::HttpBody; #[derive(Clone)] -pub struct SubCommand; +pub struct HttpGet; -impl Command for SubCommand { +impl Command for HttpGet { fn name(&self) -> &str { "http get" } @@ -216,6 +216,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(HttpGet {}) } } diff --git a/crates/nu-command/src/network/http/head.rs b/crates/nu-command/src/network/http/head.rs index 4245d77abd..5298fefda8 100644 --- a/crates/nu-command/src/network/http/head.rs +++ b/crates/nu-command/src/network/http/head.rs @@ -8,9 +8,9 @@ use nu_engine::command_prelude::*; use nu_protocol::Signals; #[derive(Clone)] -pub struct SubCommand; +pub struct HttpHead; -impl Command for SubCommand { +impl Command for HttpHead { fn name(&self) -> &str { "http head" } @@ -175,6 +175,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(HttpHead {}) } } diff --git a/crates/nu-command/src/network/http/mod.rs b/crates/nu-command/src/network/http/mod.rs index 91fcb86b5e..7e13c53501 100644 --- a/crates/nu-command/src/network/http/mod.rs +++ b/crates/nu-command/src/network/http/mod.rs @@ -8,11 +8,11 @@ mod patch; mod post; mod put; -pub use delete::SubCommand as HttpDelete; -pub use get::SubCommand as HttpGet; -pub use head::SubCommand as HttpHead; +pub use delete::HttpDelete; +pub use get::HttpGet; +pub use head::HttpHead; pub use http_::Http; -pub use options::SubCommand as HttpOptions; -pub use patch::SubCommand as HttpPatch; -pub use post::SubCommand as HttpPost; -pub use put::SubCommand as HttpPut; +pub use options::HttpOptions; +pub use patch::HttpPatch; +pub use post::HttpPost; +pub use put::HttpPut; diff --git a/crates/nu-command/src/network/http/options.rs b/crates/nu-command/src/network/http/options.rs index c8ee91d530..75a459cb9b 100644 --- a/crates/nu-command/src/network/http/options.rs +++ b/crates/nu-command/src/network/http/options.rs @@ -7,9 +7,9 @@ use nu_engine::command_prelude::*; use super::client::HttpBody; #[derive(Clone)] -pub struct SubCommand; +pub struct HttpOptions; -impl Command for SubCommand { +impl Command for HttpOptions { fn name(&self) -> &str { "http options" } @@ -197,6 +197,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(HttpOptions {}) } } diff --git a/crates/nu-command/src/network/http/patch.rs b/crates/nu-command/src/network/http/patch.rs index e3db71d3b1..ee8143650a 100644 --- a/crates/nu-command/src/network/http/patch.rs +++ b/crates/nu-command/src/network/http/patch.rs @@ -6,9 +6,9 @@ use crate::network::http::client::{ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct HttpPatch; -impl Command for SubCommand { +impl Command for HttpPatch { fn name(&self) -> &str { "http patch" } @@ -250,6 +250,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(HttpPatch {}) } } diff --git a/crates/nu-command/src/network/http/post.rs b/crates/nu-command/src/network/http/post.rs index 5a23765366..8c2a3edb9d 100644 --- a/crates/nu-command/src/network/http/post.rs +++ b/crates/nu-command/src/network/http/post.rs @@ -6,9 +6,9 @@ use crate::network::http::client::{ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct HttpPost; -impl Command for SubCommand { +impl Command for HttpPost { fn name(&self) -> &str { "http post" } @@ -258,6 +258,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(HttpPost {}) } } diff --git a/crates/nu-command/src/network/http/put.rs b/crates/nu-command/src/network/http/put.rs index a1c2aa71a3..69adaa9aba 100644 --- a/crates/nu-command/src/network/http/put.rs +++ b/crates/nu-command/src/network/http/put.rs @@ -6,9 +6,9 @@ use crate::network::http::client::{ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct HttpPut; -impl Command for SubCommand { +impl Command for HttpPut { fn name(&self) -> &str { "http put" } @@ -249,6 +249,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(HttpPut {}) } } diff --git a/crates/nu-command/src/network/mod.rs b/crates/nu-command/src/network/mod.rs index 2366fde594..ca6f850155 100644 --- a/crates/nu-command/src/network/mod.rs +++ b/crates/nu-command/src/network/mod.rs @@ -11,7 +11,7 @@ pub use self::http::*; pub use self::url::*; #[cfg(feature = "network")] -pub use port::SubCommand as Port; +pub use port::Port; #[cfg(feature = "network")] pub use version_check::VersionCheck; diff --git a/crates/nu-command/src/network/port.rs b/crates/nu-command/src/network/port.rs index fe3c987b85..28d52c07f0 100644 --- a/crates/nu-command/src/network/port.rs +++ b/crates/nu-command/src/network/port.rs @@ -4,9 +4,9 @@ use nu_protocol::shell_error::io::IoError; use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4, TcpListener}; #[derive(Clone)] -pub struct SubCommand; +pub struct Port; -impl Command for SubCommand { +impl Command for Port { fn name(&self) -> &str { "port" } diff --git a/crates/nu-command/src/network/url/build_query.rs b/crates/nu-command/src/network/url/build_query.rs index e11f476469..aaf96296e9 100644 --- a/crates/nu-command/src/network/url/build_query.rs +++ b/crates/nu-command/src/network/url/build_query.rs @@ -3,9 +3,9 @@ use nu_engine::command_prelude::*; use super::query::{record_to_query_string, table_to_query_string}; #[derive(Clone)] -pub struct SubCommand; +pub struct UrlBuildQuery; -impl Command for SubCommand { +impl Command for UrlBuildQuery { fn name(&self) -> &str { "url build-query" } @@ -90,6 +90,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(UrlBuildQuery {}) } } diff --git a/crates/nu-command/src/network/url/decode.rs b/crates/nu-command/src/network/url/decode.rs index 8db5d09b15..312116f254 100644 --- a/crates/nu-command/src/network/url/decode.rs +++ b/crates/nu-command/src/network/url/decode.rs @@ -4,9 +4,9 @@ use nu_engine::command_prelude::*; use percent_encoding::percent_decode_str; #[derive(Clone)] -pub struct SubCommand; +pub struct UrlDecode; -impl Command for SubCommand { +impl Command for UrlDecode { fn name(&self) -> &str { "url decode" } @@ -114,6 +114,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(UrlDecode {}) } } diff --git a/crates/nu-command/src/network/url/encode.rs b/crates/nu-command/src/network/url/encode.rs index 3854e0b401..f0064f94d5 100644 --- a/crates/nu-command/src/network/url/encode.rs +++ b/crates/nu-command/src/network/url/encode.rs @@ -4,9 +4,9 @@ use nu_engine::command_prelude::*; use percent_encoding::{utf8_percent_encode, AsciiSet, NON_ALPHANUMERIC}; #[derive(Clone)] -pub struct SubCommand; +pub struct UrlEncode; -impl Command for SubCommand { +impl Command for UrlEncode { fn name(&self) -> &str { "url encode" } @@ -130,6 +130,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(UrlEncode {}) } } diff --git a/crates/nu-command/src/network/url/join.rs b/crates/nu-command/src/network/url/join.rs index b8e120134a..d6a8c65648 100644 --- a/crates/nu-command/src/network/url/join.rs +++ b/crates/nu-command/src/network/url/join.rs @@ -3,9 +3,9 @@ use nu_engine::command_prelude::*; use super::query::{record_to_query_string, table_to_query_string}; #[derive(Clone)] -pub struct SubCommand; +pub struct UrlJoin; -impl Command for SubCommand { +impl Command for UrlJoin { fn name(&self) -> &str { "url join" } @@ -378,6 +378,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(UrlJoin {}) } } diff --git a/crates/nu-command/src/network/url/mod.rs b/crates/nu-command/src/network/url/mod.rs index 35221e6291..e833d66d81 100644 --- a/crates/nu-command/src/network/url/mod.rs +++ b/crates/nu-command/src/network/url/mod.rs @@ -7,10 +7,10 @@ mod query; mod split_query; mod url_; -pub use self::parse::SubCommand as UrlParse; -pub use build_query::SubCommand as UrlBuildQuery; -pub use decode::SubCommand as UrlDecode; -pub use encode::SubCommand as UrlEncode; -pub use join::SubCommand as UrlJoin; -pub use split_query::SubCommand as UrlSplitQuery; +pub use self::parse::UrlParse; +pub use build_query::UrlBuildQuery; +pub use decode::UrlDecode; +pub use encode::UrlEncode; +pub use join::UrlJoin; +pub use split_query::UrlSplitQuery; pub use url_::Url; diff --git a/crates/nu-command/src/network/url/parse.rs b/crates/nu-command/src/network/url/parse.rs index c4d8caefe0..9987eb265f 100644 --- a/crates/nu-command/src/network/url/parse.rs +++ b/crates/nu-command/src/network/url/parse.rs @@ -5,9 +5,9 @@ use url::Url; use super::query::query_string_to_table; #[derive(Clone)] -pub struct SubCommand; +pub struct UrlParse; -impl Command for SubCommand { +impl Command for UrlParse { fn name(&self) -> &str { "url parse" } @@ -128,6 +128,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(UrlParse {}) } } diff --git a/crates/nu-command/src/network/url/split_query.rs b/crates/nu-command/src/network/url/split_query.rs index 3fbe282515..f400e921b4 100644 --- a/crates/nu-command/src/network/url/split_query.rs +++ b/crates/nu-command/src/network/url/split_query.rs @@ -3,9 +3,9 @@ use nu_engine::command_prelude::*; use super::query::query_string_to_table; #[derive(Clone)] -pub struct SubCommand; +pub struct UrlSplitQuery; -impl Command for SubCommand { +impl Command for UrlSplitQuery { fn name(&self) -> &str { "url split-query" } @@ -101,6 +101,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(UrlSplitQuery {}) } } diff --git a/crates/nu-command/src/path/basename.rs b/crates/nu-command/src/path/basename.rs index d619a54c34..977ff6c8e2 100644 --- a/crates/nu-command/src/path/basename.rs +++ b/crates/nu-command/src/path/basename.rs @@ -10,9 +10,9 @@ struct Arguments { impl PathSubcommandArguments for Arguments {} #[derive(Clone)] -pub struct SubCommand; +pub struct PathBasename; -impl Command for SubCommand { +impl Command for PathBasename { fn name(&self) -> &str { "path basename" } @@ -156,6 +156,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(PathBasename {}) } } diff --git a/crates/nu-command/src/path/dirname.rs b/crates/nu-command/src/path/dirname.rs index 3a3a1604e5..f64449d504 100644 --- a/crates/nu-command/src/path/dirname.rs +++ b/crates/nu-command/src/path/dirname.rs @@ -11,9 +11,9 @@ struct Arguments { impl PathSubcommandArguments for Arguments {} #[derive(Clone)] -pub struct SubCommand; +pub struct PathDirname; -impl Command for SubCommand { +impl Command for PathDirname { fn name(&self) -> &str { "path dirname" } @@ -194,6 +194,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(PathDirname {}) } } diff --git a/crates/nu-command/src/path/exists.rs b/crates/nu-command/src/path/exists.rs index 0c482a5fe5..d90800f518 100644 --- a/crates/nu-command/src/path/exists.rs +++ b/crates/nu-command/src/path/exists.rs @@ -13,9 +13,9 @@ struct Arguments { impl PathSubcommandArguments for Arguments {} #[derive(Clone)] -pub struct SubCommand; +pub struct PathExists; -impl Command for SubCommand { +impl Command for PathExists { fn name(&self) -> &str { "path exists" } @@ -167,6 +167,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(PathExists {}) } } diff --git a/crates/nu-command/src/path/expand.rs b/crates/nu-command/src/path/expand.rs index cea1282b9a..ff6728211e 100644 --- a/crates/nu-command/src/path/expand.rs +++ b/crates/nu-command/src/path/expand.rs @@ -17,9 +17,9 @@ struct Arguments { impl PathSubcommandArguments for Arguments {} #[derive(Clone)] -pub struct SubCommand; +pub struct PathExpand; -impl Command for SubCommand { +impl Command for PathExpand { fn name(&self) -> &str { "path expand" } @@ -197,6 +197,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(PathExpand {}) } } diff --git a/crates/nu-command/src/path/join.rs b/crates/nu-command/src/path/join.rs index 2d537f6822..9f055589d3 100644 --- a/crates/nu-command/src/path/join.rs +++ b/crates/nu-command/src/path/join.rs @@ -10,9 +10,9 @@ struct Arguments { impl PathSubcommandArguments for Arguments {} #[derive(Clone)] -pub struct SubCommand; +pub struct PathJoin; -impl Command for SubCommand { +impl Command for PathJoin { fn name(&self) -> &str { "path join" } @@ -299,6 +299,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(PathJoin {}) } } diff --git a/crates/nu-command/src/path/mod.rs b/crates/nu-command/src/path/mod.rs index 4b6405c8d8..d6f3a19528 100644 --- a/crates/nu-command/src/path/mod.rs +++ b/crates/nu-command/src/path/mod.rs @@ -10,17 +10,17 @@ mod self_; mod split; mod r#type; -pub use basename::SubCommand as PathBasename; -pub use dirname::SubCommand as PathDirname; -pub use exists::SubCommand as PathExists; -pub use expand::SubCommand as PathExpand; -pub use join::SubCommand as PathJoin; -pub use parse::SubCommand as PathParse; -pub use path_::PathCommand as Path; -pub use r#type::SubCommand as PathType; -pub use relative_to::SubCommand as PathRelativeTo; -pub use self_::SubCommand as PathSelf; -pub use split::SubCommand as PathSplit; +pub use basename::PathBasename; +pub use dirname::PathDirname; +pub use exists::PathExists; +pub use expand::PathExpand; +pub use join::PathJoin; +pub use parse::PathParse; +pub use path_::Path; +pub use r#type::PathType; +pub use relative_to::PathRelativeTo; +pub use self_::PathSelf; +pub use split::PathSplit; use nu_protocol::{ShellError, Span, Value}; use std::path::Path as StdPath; diff --git a/crates/nu-command/src/path/parse.rs b/crates/nu-command/src/path/parse.rs index c41bfeff1a..8025c1fcdd 100644 --- a/crates/nu-command/src/path/parse.rs +++ b/crates/nu-command/src/path/parse.rs @@ -10,9 +10,9 @@ struct Arguments { impl PathSubcommandArguments for Arguments {} #[derive(Clone)] -pub struct SubCommand; +pub struct PathParse; -impl Command for SubCommand { +impl Command for PathParse { fn name(&self) -> &str { "path parse" } @@ -252,6 +252,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(PathParse {}) } } diff --git a/crates/nu-command/src/path/path_.rs b/crates/nu-command/src/path/path_.rs index bb2b46fb38..7c3fa4e24d 100644 --- a/crates/nu-command/src/path/path_.rs +++ b/crates/nu-command/src/path/path_.rs @@ -1,9 +1,9 @@ use nu_engine::{command_prelude::*, get_full_help}; #[derive(Clone)] -pub struct PathCommand; +pub struct Path; -impl Command for PathCommand { +impl Command for Path { fn name(&self) -> &str { "path" } diff --git a/crates/nu-command/src/path/relative_to.rs b/crates/nu-command/src/path/relative_to.rs index 71cfa8b2a9..d63c3e2bb0 100644 --- a/crates/nu-command/src/path/relative_to.rs +++ b/crates/nu-command/src/path/relative_to.rs @@ -11,9 +11,9 @@ struct Arguments { impl PathSubcommandArguments for Arguments {} #[derive(Clone)] -pub struct SubCommand; +pub struct PathRelativeTo; -impl Command for SubCommand { +impl Command for PathRelativeTo { fn name(&self) -> &str { "path relative-to" } @@ -166,6 +166,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(PathRelativeTo {}) } } diff --git a/crates/nu-command/src/path/self_.rs b/crates/nu-command/src/path/self_.rs index 49c1de8624..4ed74dce16 100644 --- a/crates/nu-command/src/path/self_.rs +++ b/crates/nu-command/src/path/self_.rs @@ -3,9 +3,9 @@ use nu_path::expand_path_with; use nu_protocol::{engine::StateWorkingSet, shell_error::io::IoError}; #[derive(Clone)] -pub struct SubCommand; +pub struct PathSelf; -impl Command for SubCommand { +impl Command for PathSelf { fn name(&self) -> &str { "path self" } @@ -126,6 +126,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(PathSelf {}) } } diff --git a/crates/nu-command/src/path/split.rs b/crates/nu-command/src/path/split.rs index 727e99b024..106ec044b2 100644 --- a/crates/nu-command/src/path/split.rs +++ b/crates/nu-command/src/path/split.rs @@ -8,9 +8,9 @@ struct Arguments; impl PathSubcommandArguments for Arguments {} #[derive(Clone)] -pub struct SubCommand; +pub struct PathSplit; -impl Command for SubCommand { +impl Command for PathSplit { fn name(&self) -> &str { "path split" } @@ -193,6 +193,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(PathSplit {}) } } diff --git a/crates/nu-command/src/path/type.rs b/crates/nu-command/src/path/type.rs index 6abed1319a..bdd5d49966 100644 --- a/crates/nu-command/src/path/type.rs +++ b/crates/nu-command/src/path/type.rs @@ -11,9 +11,9 @@ struct Arguments { impl PathSubcommandArguments for Arguments {} #[derive(Clone)] -pub struct SubCommand; +pub struct PathType; -impl Command for SubCommand { +impl Command for PathType { fn name(&self) -> &str { "path type" } @@ -147,6 +147,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(PathType {}) } } diff --git a/crates/nu-command/src/platform/ansi/ansi_.rs b/crates/nu-command/src/platform/ansi/ansi_.rs index 143bbc9ac1..fb25361764 100644 --- a/crates/nu-command/src/platform/ansi/ansi_.rs +++ b/crates/nu-command/src/platform/ansi/ansi_.rs @@ -5,7 +5,7 @@ use std::collections::HashMap; use std::sync::LazyLock; #[derive(Clone)] -pub struct AnsiCommand; +pub struct Ansi; struct AnsiCode { short_name: Option<&'static str>, @@ -505,7 +505,7 @@ static CODE_LIST: LazyLock> = LazyLock::new(|| { vec![ static CODE_MAP: LazyLock> = LazyLock::new(|| build_ansi_hashmap(&CODE_LIST)); -impl Command for AnsiCommand { +impl Command for Ansi { fn name(&self) -> &str { "ansi" } @@ -902,12 +902,12 @@ fn build_ansi_hashmap(v: &[AnsiCode]) -> HashMap<&str, &str> { #[cfg(test)] mod tests { - use crate::platform::ansi::ansi_::AnsiCommand; + use crate::platform::ansi::ansi_::Ansi; #[test] fn examples_work_as_expected() { use crate::test_examples; - test_examples(AnsiCommand {}) + test_examples(Ansi {}) } } diff --git a/crates/nu-command/src/platform/ansi/link.rs b/crates/nu-command/src/platform/ansi/link.rs index 4e86f76236..9dada27bed 100644 --- a/crates/nu-command/src/platform/ansi/link.rs +++ b/crates/nu-command/src/platform/ansi/link.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct AnsiLink; -impl Command for SubCommand { +impl Command for AnsiLink { fn name(&self) -> &str { "ansi link" } @@ -144,12 +144,12 @@ fn add_osc_link(text: &str, link: &str) -> String { #[cfg(test)] mod tests { - use super::SubCommand; + use super::AnsiLink; #[test] fn examples_work_as_expected() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(AnsiLink {}) } } diff --git a/crates/nu-command/src/platform/ansi/mod.rs b/crates/nu-command/src/platform/ansi/mod.rs index a8eb5bfa93..dd130a9a64 100644 --- a/crates/nu-command/src/platform/ansi/mod.rs +++ b/crates/nu-command/src/platform/ansi/mod.rs @@ -2,6 +2,6 @@ mod ansi_; mod link; mod strip; -pub use ansi_::AnsiCommand as Ansi; -pub use link::SubCommand as AnsiLink; -pub use strip::SubCommand as AnsiStrip; +pub use ansi_::Ansi; +pub use link::AnsiLink; +pub use strip::AnsiStrip; diff --git a/crates/nu-command/src/platform/ansi/strip.rs b/crates/nu-command/src/platform/ansi/strip.rs index 23063cff63..67eb894e96 100644 --- a/crates/nu-command/src/platform/ansi/strip.rs +++ b/crates/nu-command/src/platform/ansi/strip.rs @@ -16,9 +16,9 @@ impl CmdArgument for Arguments { } #[derive(Clone)] -pub struct SubCommand; +pub struct AnsiStrip; -impl Command for SubCommand { +impl Command for AnsiStrip { fn name(&self) -> &str { "ansi strip" } @@ -83,14 +83,14 @@ fn action(input: &Value, args: &Arguments, _span: Span) -> Value { #[cfg(test)] mod tests { - use super::{action, Arguments, SubCommand}; + use super::{action, AnsiStrip, Arguments}; use nu_protocol::{engine::EngineState, Span, Value}; #[test] fn examples_work_as_expected() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(AnsiStrip {}) } #[test] diff --git a/crates/nu-command/src/random/binary.rs b/crates/nu-command/src/random/binary.rs index 726b1000d7..47e6429eba 100644 --- a/crates/nu-command/src/random/binary.rs +++ b/crates/nu-command/src/random/binary.rs @@ -2,9 +2,9 @@ use nu_engine::command_prelude::*; use rand::{thread_rng, RngCore}; #[derive(Clone)] -pub struct SubCommand; +pub struct RandomBinary; -impl Command for SubCommand { +impl Command for RandomBinary { fn name(&self) -> &str { "random binary" } @@ -89,6 +89,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(RandomBinary {}) } } diff --git a/crates/nu-command/src/random/bool.rs b/crates/nu-command/src/random/bool.rs index a2f13d337c..51870a7836 100644 --- a/crates/nu-command/src/random/bool.rs +++ b/crates/nu-command/src/random/bool.rs @@ -3,9 +3,9 @@ use nu_engine::command_prelude::*; use rand::prelude::{thread_rng, Rng}; #[derive(Clone)] -pub struct SubCommand; +pub struct RandomBool; -impl Command for SubCommand { +impl Command for RandomBool { fn name(&self) -> &str { "random bool" } @@ -91,6 +91,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(RandomBool {}) } } diff --git a/crates/nu-command/src/random/chars.rs b/crates/nu-command/src/random/chars.rs index 975f0f0c76..5ef76603b7 100644 --- a/crates/nu-command/src/random/chars.rs +++ b/crates/nu-command/src/random/chars.rs @@ -7,9 +7,9 @@ use rand::{ const DEFAULT_CHARS_LENGTH: usize = 25; #[derive(Clone)] -pub struct SubCommand; +pub struct RandomChars; -impl Command for SubCommand { +impl Command for RandomChars { fn name(&self) -> &str { "random chars" } @@ -119,6 +119,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(RandomChars {}) } } diff --git a/crates/nu-command/src/random/dice.rs b/crates/nu-command/src/random/dice.rs index 32768a9937..c9720e49bb 100644 --- a/crates/nu-command/src/random/dice.rs +++ b/crates/nu-command/src/random/dice.rs @@ -3,9 +3,9 @@ use nu_protocol::ListStream; use rand::prelude::{thread_rng, Rng}; #[derive(Clone)] -pub struct SubCommand; +pub struct RandomDice; -impl Command for SubCommand { +impl Command for RandomDice { fn name(&self) -> &str { "random dice" } @@ -89,6 +89,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(RandomDice {}) } } diff --git a/crates/nu-command/src/random/float.rs b/crates/nu-command/src/random/float.rs index ad2c39e069..fb7cc329b4 100644 --- a/crates/nu-command/src/random/float.rs +++ b/crates/nu-command/src/random/float.rs @@ -4,9 +4,9 @@ use rand::prelude::{thread_rng, Rng}; use std::ops::Bound; #[derive(Clone)] -pub struct SubCommand; +pub struct RandomFloat; -impl Command for SubCommand { +impl Command for RandomFloat { fn name(&self) -> &str { "random float" } @@ -112,6 +112,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(RandomFloat {}) } } diff --git a/crates/nu-command/src/random/int.rs b/crates/nu-command/src/random/int.rs index 461ed2090c..2adff1ec70 100644 --- a/crates/nu-command/src/random/int.rs +++ b/crates/nu-command/src/random/int.rs @@ -4,9 +4,9 @@ use rand::prelude::{thread_rng, Rng}; use std::ops::Bound; #[derive(Clone)] -pub struct SubCommand; +pub struct RandomInt; -impl Command for SubCommand { +impl Command for RandomInt { fn name(&self) -> &str { "random int" } @@ -124,6 +124,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(RandomInt {}) } } diff --git a/crates/nu-command/src/random/mod.rs b/crates/nu-command/src/random/mod.rs index 4c05376c88..43c8af862f 100644 --- a/crates/nu-command/src/random/mod.rs +++ b/crates/nu-command/src/random/mod.rs @@ -7,11 +7,11 @@ mod int; mod random_; mod uuid; -pub use self::binary::SubCommand as RandomBinary; -pub use self::bool::SubCommand as RandomBool; -pub use self::chars::SubCommand as RandomChars; -pub use self::dice::SubCommand as RandomDice; -pub use self::float::SubCommand as RandomFloat; -pub use self::int::SubCommand as RandomInt; -pub use self::uuid::SubCommand as RandomUuid; -pub use random_::RandomCommand as Random; +pub use self::binary::RandomBinary; +pub use self::bool::RandomBool; +pub use self::chars::RandomChars; +pub use self::dice::RandomDice; +pub use self::float::RandomFloat; +pub use self::int::RandomInt; +pub use self::uuid::RandomUuid; +pub use random_::Random; diff --git a/crates/nu-command/src/random/random_.rs b/crates/nu-command/src/random/random_.rs index e9159e242a..1586fbb918 100644 --- a/crates/nu-command/src/random/random_.rs +++ b/crates/nu-command/src/random/random_.rs @@ -1,9 +1,9 @@ use nu_engine::{command_prelude::*, get_full_help}; #[derive(Clone)] -pub struct RandomCommand; +pub struct Random; -impl Command for RandomCommand { +impl Command for Random { fn name(&self) -> &str { "random" } diff --git a/crates/nu-command/src/random/uuid.rs b/crates/nu-command/src/random/uuid.rs index ab8820367c..48b2df8ee4 100644 --- a/crates/nu-command/src/random/uuid.rs +++ b/crates/nu-command/src/random/uuid.rs @@ -2,9 +2,9 @@ use nu_engine::command_prelude::*; use uuid::{Timestamp, Uuid}; #[derive(Clone)] -pub struct SubCommand; +pub struct RandomUuid; -impl Command for SubCommand { +impl Command for RandomUuid { fn name(&self) -> &str { "random uuid" } @@ -333,6 +333,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(RandomUuid {}) } } diff --git a/crates/nu-command/src/removed/format.rs b/crates/nu-command/src/removed/format.rs index 84083b037b..791d3f28f5 100644 --- a/crates/nu-command/src/removed/format.rs +++ b/crates/nu-command/src/removed/format.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct DateFormat; -impl Command for SubCommand { +impl Command for DateFormat { fn name(&self) -> &str { "date format" } diff --git a/crates/nu-command/src/removed/mod.rs b/crates/nu-command/src/removed/mod.rs index 5ea783d9ca..5b7ac39522 100644 --- a/crates/nu-command/src/removed/mod.rs +++ b/crates/nu-command/src/removed/mod.rs @@ -2,6 +2,6 @@ mod format; mod let_env; mod removed_commands; -pub use format::SubCommand as DateFormat; +pub use format::DateFormat; pub use let_env::LetEnv; pub use removed_commands::*; diff --git a/crates/nu-command/src/strings/split/chars.rs b/crates/nu-command/src/strings/split/chars.rs index ac71121645..c40bdffa6e 100644 --- a/crates/nu-command/src/strings/split/chars.rs +++ b/crates/nu-command/src/strings/split/chars.rs @@ -4,9 +4,9 @@ use nu_engine::command_prelude::*; use unicode_segmentation::UnicodeSegmentation; #[derive(Clone)] -pub struct SubCommand; +pub struct SplitChars; -impl Command for SubCommand { +impl Command for SplitChars { fn name(&self) -> &str { "split chars" } @@ -173,6 +173,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(SplitChars {}) } } diff --git a/crates/nu-command/src/strings/split/column.rs b/crates/nu-command/src/strings/split/column.rs index 3f355a43c0..663ffff876 100644 --- a/crates/nu-command/src/strings/split/column.rs +++ b/crates/nu-command/src/strings/split/column.rs @@ -2,9 +2,9 @@ use fancy_regex::{escape, Regex}; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct SplitColumn; -impl Command for SubCommand { +impl Command for SplitColumn { fn name(&self) -> &str { "split column" } @@ -275,6 +275,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(SplitColumn {}) } } diff --git a/crates/nu-command/src/strings/split/command.rs b/crates/nu-command/src/strings/split/command.rs index 8f76f30a18..bf438638d1 100644 --- a/crates/nu-command/src/strings/split/command.rs +++ b/crates/nu-command/src/strings/split/command.rs @@ -1,9 +1,9 @@ use nu_engine::{command_prelude::*, get_full_help}; #[derive(Clone)] -pub struct SplitCommand; +pub struct Split; -impl Command for SplitCommand { +impl Command for Split { fn name(&self) -> &str { "split" } diff --git a/crates/nu-command/src/strings/split/mod.rs b/crates/nu-command/src/strings/split/mod.rs index 878641540e..f0dfabe198 100644 --- a/crates/nu-command/src/strings/split/mod.rs +++ b/crates/nu-command/src/strings/split/mod.rs @@ -5,9 +5,9 @@ mod list; mod row; mod words; -pub use chars::SubCommand as SplitChars; -pub use column::SubCommand as SplitColumn; -pub use command::SplitCommand as Split; +pub use chars::SplitChars; +pub use column::SplitColumn; +pub use command::Split; pub use list::SubCommand as SplitList; -pub use row::SubCommand as SplitRow; -pub use words::SubCommand as SplitWords; +pub use row::SplitRow; +pub use words::SplitWords; diff --git a/crates/nu-command/src/strings/split/row.rs b/crates/nu-command/src/strings/split/row.rs index 939ac1cc7f..d1a16e7c7e 100644 --- a/crates/nu-command/src/strings/split/row.rs +++ b/crates/nu-command/src/strings/split/row.rs @@ -2,9 +2,9 @@ use fancy_regex::{escape, Regex}; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct SplitRow; -impl Command for SubCommand { +impl Command for SplitRow { fn name(&self) -> &str { "split row" } @@ -239,6 +239,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(SplitRow {}) } } diff --git a/crates/nu-command/src/strings/split/words.rs b/crates/nu-command/src/strings/split/words.rs index 9d392302c2..0aa02b5e93 100644 --- a/crates/nu-command/src/strings/split/words.rs +++ b/crates/nu-command/src/strings/split/words.rs @@ -5,9 +5,9 @@ use nu_engine::command_prelude::*; use unicode_segmentation::UnicodeSegmentation; #[derive(Clone)] -pub struct SubCommand; +pub struct SplitWords; -impl Command for SubCommand { +impl Command for SplitWords { fn name(&self) -> &str { "split words" } @@ -420,7 +420,7 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(SplitWords {}) } #[test] fn mixed_letter_number() { diff --git a/crates/nu-command/src/strings/str_/case/capitalize.rs b/crates/nu-command/src/strings/str_/case/capitalize.rs index 545385a13c..8bcb690566 100644 --- a/crates/nu-command/src/strings/str_/case/capitalize.rs +++ b/crates/nu-command/src/strings/str_/case/capitalize.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct StrCapitalize; -impl Command for SubCommand { +impl Command for StrCapitalize { fn name(&self) -> &str { "str capitalize" } @@ -145,6 +145,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrCapitalize {}) } } diff --git a/crates/nu-command/src/strings/str_/case/downcase.rs b/crates/nu-command/src/strings/str_/case/downcase.rs index 72c6619fc3..58854436ea 100644 --- a/crates/nu-command/src/strings/str_/case/downcase.rs +++ b/crates/nu-command/src/strings/str_/case/downcase.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct StrDowncase; -impl Command for SubCommand { +impl Command for StrDowncase { fn name(&self) -> &str { "str downcase" } @@ -143,6 +143,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrDowncase {}) } } diff --git a/crates/nu-command/src/strings/str_/case/mod.rs b/crates/nu-command/src/strings/str_/case/mod.rs index 3390ff097e..5fed0ad2e6 100644 --- a/crates/nu-command/src/strings/str_/case/mod.rs +++ b/crates/nu-command/src/strings/str_/case/mod.rs @@ -3,10 +3,10 @@ mod downcase; mod str_; mod upcase; -pub use capitalize::SubCommand as StrCapitalize; -pub use downcase::SubCommand as StrDowncase; +pub use capitalize::StrCapitalize; +pub use downcase::StrDowncase; pub use str_::Str; -pub use upcase::SubCommand as StrUpcase; +pub use upcase::StrUpcase; use nu_cmd_base::input_handler::{operate as general_operate, CmdArgument}; use nu_engine::command_prelude::*; diff --git a/crates/nu-command/src/strings/str_/case/upcase.rs b/crates/nu-command/src/strings/str_/case/upcase.rs index 0fe46ce4e7..3eb554cef0 100644 --- a/crates/nu-command/src/strings/str_/case/upcase.rs +++ b/crates/nu-command/src/strings/str_/case/upcase.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct StrUpcase; -impl Command for SubCommand { +impl Command for StrUpcase { fn name(&self) -> &str { "str upcase" } @@ -116,13 +116,13 @@ fn action(input: &Value, head: Span) -> Value { #[cfg(test)] mod tests { use super::*; - use super::{action, SubCommand}; + use super::{action, StrUpcase}; #[test] fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrUpcase {}) } #[test] diff --git a/crates/nu-command/src/strings/str_/contains.rs b/crates/nu-command/src/strings/str_/contains.rs index d24fac6668..5e500f95fb 100644 --- a/crates/nu-command/src/strings/str_/contains.rs +++ b/crates/nu-command/src/strings/str_/contains.rs @@ -4,7 +4,7 @@ use nu_engine::command_prelude::*; use nu_utils::IgnoreCaseExt; #[derive(Clone)] -pub struct SubCommand; +pub struct StrContains; struct Arguments { substring: String, @@ -18,7 +18,7 @@ impl CmdArgument for Arguments { } } -impl Command for SubCommand { +impl Command for StrContains { fn name(&self) -> &str { "str contains" } @@ -187,6 +187,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrContains {}) } } diff --git a/crates/nu-command/src/strings/str_/distance.rs b/crates/nu-command/src/strings/str_/distance.rs index ce54abcbe4..e6a286b551 100644 --- a/crates/nu-command/src/strings/str_/distance.rs +++ b/crates/nu-command/src/strings/str_/distance.rs @@ -3,7 +3,7 @@ use nu_engine::command_prelude::*; use nu_protocol::{engine::StateWorkingSet, levenshtein_distance}; #[derive(Clone)] -pub struct SubCommand; +pub struct StrDistance; struct Arguments { compare_string: String, @@ -16,7 +16,7 @@ impl CmdArgument for Arguments { } } -impl Command for SubCommand { +impl Command for StrDistance { fn name(&self) -> &str { "str distance" } @@ -148,6 +148,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrDistance {}) } } diff --git a/crates/nu-command/src/strings/str_/ends_with.rs b/crates/nu-command/src/strings/str_/ends_with.rs index bb70a919e8..b23a11dca8 100644 --- a/crates/nu-command/src/strings/str_/ends_with.rs +++ b/crates/nu-command/src/strings/str_/ends_with.rs @@ -16,9 +16,9 @@ impl CmdArgument for Arguments { } #[derive(Clone)] -pub struct SubCommand; +pub struct StrEndswith; -impl Command for SubCommand { +impl Command for StrEndswith { fn name(&self) -> &str { "str ends-with" } @@ -149,6 +149,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrEndswith {}) } } diff --git a/crates/nu-command/src/strings/str_/expand.rs b/crates/nu-command/src/strings/str_/expand.rs index ea98f887ad..ab4cb7e67f 100644 --- a/crates/nu-command/src/strings/str_/expand.rs +++ b/crates/nu-command/src/strings/str_/expand.rs @@ -1,9 +1,9 @@ use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct StrExpand; -impl Command for SubCommand { +impl Command for StrExpand { fn name(&self) -> &str { "str expand" } @@ -377,6 +377,6 @@ mod tests { #[test] fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrExpand {}) } } diff --git a/crates/nu-command/src/strings/str_/index_of.rs b/crates/nu-command/src/strings/str_/index_of.rs index efd9540158..da98248582 100644 --- a/crates/nu-command/src/strings/str_/index_of.rs +++ b/crates/nu-command/src/strings/str_/index_of.rs @@ -21,9 +21,9 @@ impl CmdArgument for Arguments { } #[derive(Clone)] -pub struct SubCommand; +pub struct StrIndexOf; -impl Command for SubCommand { +impl Command for StrIndexOf { fn name(&self) -> &str { "str index-of" } @@ -246,13 +246,13 @@ mod tests { use nu_protocol::ast::RangeInclusion; use super::*; - use super::{action, Arguments, SubCommand}; + use super::{action, Arguments, StrIndexOf}; #[test] fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrIndexOf {}) } #[test] diff --git a/crates/nu-command/src/strings/str_/length.rs b/crates/nu-command/src/strings/str_/length.rs index ca1313e710..f5eedd29ae 100644 --- a/crates/nu-command/src/strings/str_/length.rs +++ b/crates/nu-command/src/strings/str_/length.rs @@ -16,9 +16,9 @@ impl CmdArgument for Arguments { } #[derive(Clone)] -pub struct SubCommand; +pub struct StrLength; -impl Command for SubCommand { +impl Command for StrLength { fn name(&self) -> &str { "str length" } @@ -177,6 +177,6 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrLength {}) } } diff --git a/crates/nu-command/src/strings/str_/mod.rs b/crates/nu-command/src/strings/str_/mod.rs index fb34ace833..a1db758d94 100644 --- a/crates/nu-command/src/strings/str_/mod.rs +++ b/crates/nu-command/src/strings/str_/mod.rs @@ -14,16 +14,16 @@ mod substring; mod trim; pub use case::*; -pub use contains::SubCommand as StrContains; -pub use distance::SubCommand as StrDistance; -pub use ends_with::SubCommand as StrEndswith; -pub use expand::SubCommand as StrExpand; -pub use index_of::SubCommand as StrIndexOf; +pub use contains::StrContains; +pub use distance::StrDistance; +pub use ends_with::StrEndswith; +pub use expand::StrExpand; +pub use index_of::StrIndexOf; pub use join::*; -pub use length::SubCommand as StrLength; -pub use replace::SubCommand as StrReplace; -pub use reverse::SubCommand as StrReverse; -pub use starts_with::SubCommand as StrStartsWith; -pub use stats::SubCommand as StrStats; -pub use substring::SubCommand as StrSubstring; -pub use trim::Trim as StrTrim; +pub use length::StrLength; +pub use replace::StrReplace; +pub use reverse::StrReverse; +pub use starts_with::StrStartsWith; +pub use stats::StrStats; +pub use substring::StrSubstring; +pub use trim::StrTrim; diff --git a/crates/nu-command/src/strings/str_/replace.rs b/crates/nu-command/src/strings/str_/replace.rs index a893a88c62..50ba95cdd4 100644 --- a/crates/nu-command/src/strings/str_/replace.rs +++ b/crates/nu-command/src/strings/str_/replace.rs @@ -19,9 +19,9 @@ impl CmdArgument for Arguments { } #[derive(Clone)] -pub struct SubCommand; +pub struct StrReplace; -impl Command for SubCommand { +impl Command for StrReplace { fn name(&self) -> &str { "str replace" } @@ -304,7 +304,7 @@ fn action( #[cfg(test)] mod tests { use super::*; - use super::{action, Arguments, SubCommand}; + use super::{action, Arguments, StrReplace}; fn test_spanned_string(val: &str) -> Spanned { Spanned { @@ -317,7 +317,7 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrReplace {}) } #[test] diff --git a/crates/nu-command/src/strings/str_/reverse.rs b/crates/nu-command/src/strings/str_/reverse.rs index 310efed854..158c284200 100644 --- a/crates/nu-command/src/strings/str_/reverse.rs +++ b/crates/nu-command/src/strings/str_/reverse.rs @@ -2,9 +2,9 @@ use nu_cmd_base::input_handler::{operate, CellPathOnlyArgs}; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct StrReverse; -impl Command for SubCommand { +impl Command for StrReverse { fn name(&self) -> &str { "str reverse" } @@ -117,6 +117,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrReverse {}) } } diff --git a/crates/nu-command/src/strings/str_/starts_with.rs b/crates/nu-command/src/strings/str_/starts_with.rs index fecf560519..9d708e23da 100644 --- a/crates/nu-command/src/strings/str_/starts_with.rs +++ b/crates/nu-command/src/strings/str_/starts_with.rs @@ -17,9 +17,9 @@ impl CmdArgument for Arguments { #[derive(Clone)] -pub struct SubCommand; +pub struct StrStartsWith; -impl Command for SubCommand { +impl Command for StrStartsWith { fn name(&self) -> &str { "str starts-with" } @@ -161,6 +161,6 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrStartsWith {}) } } diff --git a/crates/nu-command/src/strings/str_/stats.rs b/crates/nu-command/src/strings/str_/stats.rs index 6566b566c6..bd0bbfdd8f 100644 --- a/crates/nu-command/src/strings/str_/stats.rs +++ b/crates/nu-command/src/strings/str_/stats.rs @@ -9,9 +9,9 @@ use unicode_segmentation::UnicodeSegmentation; pub type Counted = BTreeMap; #[derive(Clone)] -pub struct SubCommand; +pub struct StrStats; -impl Command for SubCommand { +impl Command for StrStats { fn name(&self) -> &str { "str stats" } @@ -293,7 +293,7 @@ mod test { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrStats {}) } } diff --git a/crates/nu-command/src/strings/str_/substring.rs b/crates/nu-command/src/strings/str_/substring.rs index 57e4426f49..6fbcb05358 100644 --- a/crates/nu-command/src/strings/str_/substring.rs +++ b/crates/nu-command/src/strings/str_/substring.rs @@ -7,7 +7,7 @@ use nu_protocol::{engine::StateWorkingSet, IntRange}; use unicode_segmentation::UnicodeSegmentation; #[derive(Clone)] -pub struct SubCommand; +pub struct StrSubstring; struct Arguments { range: IntRange, @@ -21,7 +21,7 @@ impl CmdArgument for Arguments { } } -impl Command for SubCommand { +impl Command for StrSubstring { fn name(&self) -> &str { "str substring" } @@ -188,13 +188,13 @@ fn action(input: &Value, args: &Arguments, head: Span) -> Value { mod tests { use nu_protocol::IntRange; - use super::{action, Arguments, Span, SubCommand, Value}; + use super::{action, Arguments, Span, StrSubstring, Value}; #[test] fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrSubstring {}) } #[derive(Clone, Copy, Debug)] diff --git a/crates/nu-command/src/strings/str_/trim/mod.rs b/crates/nu-command/src/strings/str_/trim/mod.rs index 33d949ef5c..236f835d52 100644 --- a/crates/nu-command/src/strings/str_/trim/mod.rs +++ b/crates/nu-command/src/strings/str_/trim/mod.rs @@ -1,2 +1,2 @@ mod trim_; -pub use trim_::SubCommand as Trim; +pub use trim_::StrTrim; diff --git a/crates/nu-command/src/strings/str_/trim/trim_.rs b/crates/nu-command/src/strings/str_/trim/trim_.rs index 71e4359f78..014a9bb469 100644 --- a/crates/nu-command/src/strings/str_/trim/trim_.rs +++ b/crates/nu-command/src/strings/str_/trim/trim_.rs @@ -2,7 +2,7 @@ use nu_cmd_base::input_handler::{operate, CmdArgument}; use nu_engine::command_prelude::*; #[derive(Clone)] -pub struct SubCommand; +pub struct StrTrim; struct Arguments { to_trim: Option, @@ -23,7 +23,7 @@ pub enum TrimSide { Both, } -impl Command for SubCommand { +impl Command for StrTrim { fn name(&self) -> &str { "str trim" } @@ -272,7 +272,7 @@ mod tests { fn test_examples() { use crate::test_examples; - test_examples(SubCommand {}) + test_examples(StrTrim {}) } fn make_record(cols: Vec<&str>, vals: Vec<&str>) -> Value {