mirror of
https://github.com/nushell/nushell
synced 2024-11-15 09:27:08 +00: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 changed files with 1 additions and 14 deletions
|
@ -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 a new issue