mirror of
https://github.com/nushell/nushell.git
synced 2024-11-26 02:13:47 +01:00
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:
parent
a15462fd00
commit
e8bcfbaed1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user