From a142d1a1926457022d3dce89aa374cf38e967954 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Sat, 25 Jun 2022 19:06:39 -0500 Subject: [PATCH] update encode decode with new signature (#5881) --- .../src/strings/encode_decode/decode_base64.rs | 10 +--------- .../src/strings/encode_decode/encode_base64.rs | 9 +-------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/crates/nu-command/src/strings/encode_decode/decode_base64.rs b/crates/nu-command/src/strings/encode_decode/decode_base64.rs index 9896d89b93..21ad5600e6 100644 --- a/crates/nu-command/src/strings/encode_decode/decode_base64.rs +++ b/crates/nu-command/src/strings/encode_decode/decode_base64.rs @@ -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 { operate(ActionType::Decode, engine_state, stack, call, input) } - - fn input_type(&self) -> Type { - Type::Any - } - - fn output_type(&self) -> Type { - Type::Any - } } #[cfg(test)] diff --git a/crates/nu-command/src/strings/encode_decode/encode_base64.rs b/crates/nu-command/src/strings/encode_decode/encode_base64.rs index 6ef29fb96a..b0e4afd737 100644 --- a/crates/nu-command/src/strings/encode_decode/encode_base64.rs +++ b/crates/nu-command/src/strings/encode_decode/encode_base64.rs @@ -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 { operate(ActionType::Encode, engine_state, stack, call, input) } - - fn input_type(&self) -> Type { - Type::Any - } - - fn output_type(&self) -> Type { - Type::String - } } #[cfg(test)]