Describe object now matches cmd name (#2603)

This commit is contained in:
Chris Gillespie
2020-09-26 18:54:47 -07:00
committed by GitHub
parent ed243c88d2
commit 18909ec14a
3 changed files with 10 additions and 10 deletions

View File

@@ -4,13 +4,13 @@ use crate::prelude::*;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, UntaggedValue};
pub struct What;
pub struct Describe;
#[derive(Deserialize)]
pub struct WhatArgs {}
pub struct DescribeArgs {}
#[async_trait]
impl WholeStreamCommand for What {
impl WholeStreamCommand for Describe {
fn name(&self) -> &str {
"describe"
}
@@ -28,11 +28,11 @@ impl WholeStreamCommand for What {
args: CommandArgs,
registry: &CommandRegistry,
) -> Result<OutputStream, ShellError> {
what(args, registry).await
describe(args, registry).await
}
}
pub async fn what(
pub async fn describe(
args: CommandArgs,
_registry: &CommandRegistry,
) -> Result<OutputStream, ShellError> {
@@ -49,12 +49,12 @@ pub async fn what(
#[cfg(test)]
mod tests {
use super::What;
use super::Describe;
#[test]
fn examples_work_as_expected() {
use crate::examples::test as test_examples;
test_examples(What {})
test_examples(Describe {})
}
}