mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
remove unused Serialize
This commit is contained in:
parent
e745a81a5e
commit
89e07849f7
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user