Format with rustfmt 0.8.2

This commit is contained in:
David Tolnay 2018-06-16 19:55:46 -07:00
parent 9316c31625
commit 75312089bd
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
4 changed files with 11 additions and 25 deletions

View File

@ -339,11 +339,13 @@ impl<'de, R: Read<'de>> Deserializer<R> {
// number as a `u64` until we grow too large. At that point, switch to
// parsing the value as a `f64`.
if overflow!(res * 10 + digit, u64::max_value()) {
return Ok(ParserNumber::F64(try!(self.parse_long_integer(
positive,
res,
1, // res * 10^1
))));
return Ok(ParserNumber::F64(try!(
self.parse_long_integer(
positive,
res,
1, // res * 10^1
)
)));
}
res = res * 10 + digit;

View File

@ -146,11 +146,7 @@ where
}
}
impl<R> private::Sealed for IoRead<R>
where
R: io::Read,
{
}
impl<R> private::Sealed for IoRead<R> where R: io::Read {}
impl<R> IoRead<R>
where

View File

@ -147,11 +147,7 @@ mod private {
impl Sealed for usize {}
impl Sealed for str {}
impl Sealed for String {}
impl<'a, T: ?Sized> Sealed for &'a T
where
T: Sealed,
{
}
impl<'a, T: ?Sized> Sealed for &'a T where T: Sealed {}
}
/// Used in panic messages.

View File

@ -312,12 +312,7 @@ fn test_write_object() {
),
]);
test_encode_ok(&[
(
treemap!['c' => ()],
"{\"c\":null}",
),
]);
test_encode_ok(&[(treemap!['c' => ()], "{\"c\":null}")]);
test_pretty_encode_ok(&[
(
@ -1106,10 +1101,7 @@ fn test_parse_object() {
),
)]);
test_parse_ok(vec![(
"{\"c\":null}",
treemap!('c' => ()),
)]);
test_parse_ok(vec![("{\"c\":null}", treemap!('c' => ()))]);
}
#[test]