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