Address nits

This commit is contained in:
Corey Richardson 2016-05-13 11:17:17 +10:00
parent ae806af644
commit 9b7317fbb1
No known key found for this signature in database
GPG Key ID: A89E9F8FB71E9B8B
2 changed files with 1 additions and 2 deletions

View File

@ -1024,8 +1024,6 @@ impl<T, E> Deserialize for Result<T, E> where T: Deserialize, E: Deserialize {
#[cfg(all(not(feature = "std"), not(feature = "collections")))]
fn visit_usize<E>(&mut self, value: usize) -> Result<Field, E> where E: Error {
#[cfg(feature = "collections")]
use collections::string::ToString;
match value {
0 => Ok(Field::Ok),
1 => Ok(Field::Err),

View File

@ -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())
}