mirror of
https://github.com/nushell/nushell.git
synced 2024-11-25 01:43:47 +01:00
fmt, clippy, and Category change
This commit is contained in:
parent
192e6dc3a7
commit
139703f0df
@ -18,7 +18,7 @@ impl Command for SubCommand {
|
||||
(Type::String, Type::record()),
|
||||
])
|
||||
.allow_variants_without_examples(true) // https://github.com/nushell/nushell/issues/7032
|
||||
.category(Category::Date)
|
||||
.category(Category::Deprecated)
|
||||
}
|
||||
|
||||
fn description(&self) -> &str {
|
||||
@ -36,10 +36,9 @@ impl Command for SubCommand {
|
||||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
|
||||
let head = call.head;
|
||||
report_parse_warning(
|
||||
&StateWorkingSet::new(&engine_state),
|
||||
&StateWorkingSet::new(engine_state),
|
||||
&ParseWarning::DeprecatedWarning {
|
||||
old_command: "date to-record".into(),
|
||||
new_suggestion: "see `into record` command examples".into(),
|
||||
|
@ -18,7 +18,7 @@ impl Command for SubCommand {
|
||||
(Type::String, Type::table()),
|
||||
])
|
||||
.allow_variants_without_examples(true) // https://github.com/nushell/nushell/issues/7032
|
||||
.category(Category::Date)
|
||||
.category(Category::Deprecated)
|
||||
}
|
||||
|
||||
fn description(&self) -> &str {
|
||||
@ -38,7 +38,7 @@ impl Command for SubCommand {
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
let head = call.head;
|
||||
report_parse_warning(
|
||||
&StateWorkingSet::new(&engine_state),
|
||||
&StateWorkingSet::new(engine_state),
|
||||
&ParseWarning::DeprecatedWarning {
|
||||
old_command: "date to-table".into(),
|
||||
new_suggestion: "see `into record` command examples".into(),
|
||||
|
@ -44,6 +44,7 @@ pub enum Category {
|
||||
Date,
|
||||
Debug,
|
||||
Default,
|
||||
Deprecated,
|
||||
Removed,
|
||||
Env,
|
||||
Experimental,
|
||||
@ -79,6 +80,7 @@ impl std::fmt::Display for Category {
|
||||
Category::Date => "date",
|
||||
Category::Debug => "debug",
|
||||
Category::Default => "default",
|
||||
Category::Deprecated => "deprecated",
|
||||
Category::Removed => "removed",
|
||||
Category::Env => "env",
|
||||
Category::Experimental => "experimental",
|
||||
|
Loading…
Reference in New Issue
Block a user