mirror of
https://github.com/nushell/nushell.git
synced 2024-11-23 00:43:33 +01:00
update encode decode with new signature (#5881)
This commit is contained in:
parent
173d60d59d
commit
a142d1a192
@ -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)]
|
||||
|
@ -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)]
|
||||
|
Loading…
Reference in New Issue
Block a user