Skip to content
Myr

Format with rustfmt 0.6.1

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Tolnay · committed by David Tolnay · parent 47676cd · Browse files · 9 files+38 added−22 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

9 files+38 added−22 removed

  • tests:+7 added−4 removed
  • other:+31 added−18 removed

9 files+38 added−22 removed

modified:serde/src/de/impls.rs+3 added-2 removed
6 unmodified lines
7// except according to those terms.89use lib::*;1011use de::{Deserialize, Deserializer, EnumAccess, Error, SeqAccess, Unexpected, VariantAccess,12 Visitor};11use de::{12 Deserialize, Deserializer, EnumAccess, Error, SeqAccess, Unexpected, VariantAccess, Visitor,13};1415#[cfg(any(feature = "std", feature = "alloc"))]16use de::MapAccess;17
2117 unmodified lines
modified:serde/src/private/de.rs+9 added-6 removed
12 unmodified lines
13#[cfg(any(feature = "std", feature = "alloc"))]14use de::{MapAccess, Unexpected};1516#[cfg(any(feature = "std", feature = "alloc"))]17pub use self::content::{Content, ContentDeserializer, ContentRefDeserializer, EnumDeserializer,18 InternallyTaggedUnitVisitor, TagContentOtherField,19 TagContentOtherFieldVisitor, TagOrContentField, TagOrContentFieldVisitor,20 TaggedContentVisitor, UntaggedUnitVisitor};17pub use self::content::{18 Content, ContentDeserializer, ContentRefDeserializer, EnumDeserializer,19 InternallyTaggedUnitVisitor, TagContentOtherField, TagContentOtherFieldVisitor,20 TagOrContentField, TagOrContentFieldVisitor, TaggedContentVisitor, UntaggedUnitVisitor,21};2223/// If the missing field is of type `Option<T>` then treat is as `None`,24/// otherwise it is an error.25pub fn missing_field<'de, V, E>(field: &'static str) -> Result<V, E>
203 unmodified lines
229230 use lib::*;231232 use super::size_hint;233 use de::{232 use de::{self, Deserialize, DeserializeSeed, Deserializer, EnumAccess, Expected, MapAccess,233 SeqAccess, Unexpected, Visitor};234 self, Deserialize, DeserializeSeed, Deserializer, EnumAccess, Expected, MapAccess,235 SeqAccess, Unexpected, Visitor,236 };237238 /// Used from generated code to buffer the contents of the Deserializer when239 /// deserializing untagged enums and internally tagged enums.240 ///
2548 unmodified lines
modified:serde/src/private/ser.rs+3 added-2 removed
9 unmodified lines
1011use ser::{self, Impossible, Serialize, SerializeMap, SerializeStruct, Serializer};1213#[cfg(any(feature = "std", feature = "alloc"))]14use self::content::{Content, ContentSerializer, SerializeStructVariantAsMapValue,15 SerializeTupleVariantAsMapValue};14use self::content::{15 Content, ContentSerializer, SerializeStructVariantAsMapValue, SerializeTupleVariantAsMapValue,16};1718/// Used to check that serde(getter) attributes return the expected type.19/// Not public API.20pub fn constrain<T: ?Sized>(t: &T) -> &T {
1316 unmodified lines
modified:serde/src/ser/impossible.rs+4 added-2 removed
8 unmodified lines
9//! This module contains `Impossible` serializer and its implementations.1011use lib::*;1213use ser::{13use ser::{self, Serialize, SerializeMap, SerializeSeq, SerializeStruct, SerializeStructVariant,14 SerializeTuple, SerializeTupleStruct, SerializeTupleVariant};14 self, Serialize, SerializeMap, SerializeSeq, SerializeStruct, SerializeStructVariant,15 SerializeTuple, SerializeTupleStruct, SerializeTupleVariant,16};1718/// Helper type for implementing a `Serializer` that does not support19/// serializing one of the compound types.20///
209 unmodified lines
modified:serde_test/src/configure.rs+4 added-2 removed
1use std::fmt;23use serde::ser::{SerializeMap, SerializeSeq, SerializeStruct, SerializeStructVariant,4 SerializeTuple, SerializeTupleStruct, SerializeTupleVariant};3use serde::ser::{4 SerializeMap, SerializeSeq, SerializeStruct, SerializeStructVariant, SerializeTuple,5 SerializeTupleStruct, SerializeTupleVariant,6};7use serde::{Deserialize, Deserializer, Serialize, Serializer};89#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]10pub struct Readable<T: ?Sized>(T);
829 unmodified lines
modified:serde_test/src/de.rs+4 added-2 removed
5 unmodified lines
6// option. This file may not be copied, modified, or distributed7// except according to those terms.89use serde::de::value::{MapAccessDeserializer, SeqAccessDeserializer};10use serde::de::{self, Deserialize, DeserializeSeed, EnumAccess, IntoDeserializer, MapAccess,11 SeqAccess, VariantAccess, Visitor};10use serde::de::{11 self, Deserialize, DeserializeSeed, EnumAccess, IntoDeserializer, MapAccess, SeqAccess,12 VariantAccess, Visitor,13};1415use error::Error;16use token::Token;17
646 unmodified lines
modified:serde_test/src/lib.rs+4 added-2 removed
177 unmodified lines
178mod assert;179mod configure;180mod token;181182pub use assert::{assert_de_tokens, assert_de_tokens_error, assert_ser_tokens,183 assert_ser_tokens_error, assert_tokens};182pub use assert::{183 assert_de_tokens, assert_de_tokens_error, assert_ser_tokens, assert_ser_tokens_error,184 assert_tokens,185};186pub use token::Token;187188pub use configure::{Compact, Configure, Readable};189
3 unmodified lines
modified:test_suite/tests/test_annotations.rs+4 added-2 removed
15 unmodified lines
16use self::serde::{Deserialize, Deserializer, Serialize, Serializer};17use std::collections::HashMap;1819extern crate serde_test;20use self::serde_test::{assert_de_tokens, assert_de_tokens_error, assert_ser_tokens,21 assert_ser_tokens_error, assert_tokens, Token};20use self::serde_test::{21 assert_de_tokens, assert_de_tokens_error, assert_ser_tokens, assert_ser_tokens_error,22 assert_tokens, Token,23};2425trait MyDefault: Sized {26 fn my_default() -> Self;27}
1768 unmodified lines
modified:test_suite/tests/test_macros.rs+3 added-2 removed
15 unmodified lines
16extern crate serde_test;1718mod bytes;1920use self::serde_test::{assert_de_tokens, assert_de_tokens_error, assert_ser_tokens, assert_tokens,21 Token};20use self::serde_test::{21 assert_de_tokens, assert_de_tokens_error, assert_ser_tokens, assert_tokens, Token,22};2324use std::collections::BTreeMap;25use std::marker::PhantomData;26
1731 unmodified lines