update encode decode with new signature (#5881)

This commit is contained in:
Darren Schroeder 2022-06-25 19:06:39 -05:00 committed by GitHub
parent 173d60d59d
commit a142d1a192
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 17 deletions

View File

@ -2,7 +2,7 @@ use super::base64::{operate, ActionType, CHARACTER_SET_DESC};
use nu_protocol::ast::Call;
use nu_protocol::engine::{Command, EngineState, Stack};
use nu_protocol::{
Category, Example, PipelineData, ShellError, Signature, Span, SyntaxShape, Type, Value,
Category, Example, PipelineData, ShellError, Signature, Span, SyntaxShape, Value,
};
#[derive(Clone)]
@ -69,14 +69,6 @@ impl Command for DecodeBase64 {
) -> Result<PipelineData, ShellError> {
operate(ActionType::Decode, engine_state, stack, call, input)
}
fn input_type(&self) -> Type {
Type::Any
}
fn output_type(&self) -> Type {
Type::Any
}
}
#[cfg(test)]

View File

@ -26,6 +26,7 @@ impl Command for EncodeBase64 {
SyntaxShape::CellPath,
"optionally base64 encode data by column paths",
)
.output_type(Type::String)
.category(Category::Hash)
}
@ -57,14 +58,6 @@ impl Command for EncodeBase64 {
) -> Result<PipelineData, ShellError> {
operate(ActionType::Encode, engine_state, stack, call, input)
}
fn input_type(&self) -> Type {
Type::Any
}
fn output_type(&self) -> Type {
Type::String
}
}
#[cfg(test)]