From c02190a3b0552b7350ae0f9595c0a7315f28e5c2 Mon Sep 17 00:00:00 2001 From: sholderbach Date: Mon, 25 Mar 2024 21:20:38 +0100 Subject: [PATCH] Remove dead `impl PluginEncoder for EncodingType` Detected due to `clippy::wrong_self_convention` for `to_str` --- crates/nu-plugin/src/serializers/mod.rs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/crates/nu-plugin/src/serializers/mod.rs b/crates/nu-plugin/src/serializers/mod.rs index bbfd152fb7cb..e2721ea90a9d 100644 --- a/crates/nu-plugin/src/serializers/mod.rs +++ b/crates/nu-plugin/src/serializers/mod.rs @@ -1,4 +1,4 @@ -use crate::plugin::{Encoder, PluginEncoder}; +use crate::plugin::Encoder; use nu_protocol::ShellError; pub mod json; @@ -22,19 +22,6 @@ impl EncodingType { _ => None, } } - - pub fn to_str(&self) -> &'static str { - match self { - Self::Json(_) => "json", - Self::MsgPack(_) => "msgpack", - } - } -} - -impl PluginEncoder for EncodingType { - fn name(&self) -> &str { - self.to_str() - } } impl Encoder for EncodingType