remove unused Serialize

This commit is contained in:
Eh2406 2018-07-14 22:42:38 -04:00
parent e745a81a5e
commit 89e07849f7

View File

@ -19,7 +19,7 @@ use curl::easy::Easy;
use failure;
use jobserver;
use lazycell::LazyCell;
use serde::{de, de::IntoDeserializer, Serialize, Serializer};
use serde::{de, de::IntoDeserializer};
use toml;
use core::profiles::ConfigProfiles;
@ -1351,22 +1351,6 @@ impl fmt::Debug for ConfigValue {
}
}
// TODO: Why is this here? It is unused.
impl Serialize for ConfigValue {
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
match *self {
CV::String(ref string, _) => string.serialize(s),
CV::List(ref list, _) => {
let list: Vec<&String> = list.iter().map(|s| &s.0).collect();
list.serialize(s)
}
CV::Table(ref table, _) => table.serialize(s),
CV::Boolean(b, _) => b.serialize(s),
CV::Integer(i, _) => i.serialize(s),
}
}
}
impl ConfigValue {
fn from_toml(path: &Path, toml: toml::Value) -> CargoResult<ConfigValue> {
match toml {