Remove dead impl PluginEncoder for EncodingType (#12284)

Detected due to `clippy::wrong_self_convention` for `to_str`

# Breaking change to plugin authors

seems to be implementation detail
This commit is contained in:
Stefan Holderbach 2024-03-26 12:11:49 +01:00 committed by GitHub
parent a15462fd00
commit e8bcfbaed1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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<T> Encoder<T> for EncodingType