From 9b7317fbb13657b7479cf02364fd18f8f21d7bb3 Mon Sep 17 00:00:00 2001 From: Corey Richardson Date: Fri, 13 May 2016 11:17:17 +1000 Subject: [PATCH] Address nits --- serde/src/de/impls.rs | 2 -- serde/src/ser/mod.rs | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/serde/src/de/impls.rs b/serde/src/de/impls.rs index 6cfa84cb..df9c75e4 100644 --- a/serde/src/de/impls.rs +++ b/serde/src/de/impls.rs @@ -1024,8 +1024,6 @@ impl Deserialize for Result where T: Deserialize, E: Deserialize { #[cfg(all(not(feature = "std"), not(feature = "collections")))] fn visit_usize(&mut self, value: usize) -> Result where E: Error { - #[cfg(feature = "collections")] - use collections::string::ToString; match value { 0 => Ok(Field::Ok), 1 => Ok(Field::Err), diff --git a/serde/src/ser/mod.rs b/serde/src/ser/mod.rs index 22f28498..a0d13842 100644 --- a/serde/src/ser/mod.rs +++ b/serde/src/ser/mod.rs @@ -124,6 +124,7 @@ pub trait Serializer { /// Serializes a character. By default it serializes as bytes containing the UTF-8 encoding /// of the character. + #[inline] fn serialize_char(&mut self, v: char) -> Result<(), Self::Error> { self.serialize_bytes(::utils::encode_utf8(v).as_slice()) }