Address nits
This commit is contained in:
parent
ae806af644
commit
9b7317fbb1
@ -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),
|
||||
|
@ -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())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user