fmt, clippy, and Category change

This commit is contained in:
NotTheDr01ds 2024-11-12 15:05:45 -05:00
parent 192e6dc3a7
commit 139703f0df
3 changed files with 6 additions and 5 deletions

View File

@ -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(),

View File

@ -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(),

View File

@ -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",