Skip to content

Commit 3937c76

Browse files
committed
Merge branch 'master' into 1347-doc-description
2 parents 0ec1a99 + 8b85532 commit 3937c76

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

juniper/src/integrations/serde.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use serde::{
55
Deserialize, Serialize,
66
de::{self, Deserializer, IntoDeserializer as _},
77
ser::{SerializeMap as _, Serializer},
8-
serde_if_integer128,
98
};
109

1110
use crate::{
@@ -105,10 +104,8 @@ impl<'de, S: Deserialize<'de>> Deserialize<'de> for InputValue<S> {
105104
S::deserialize(n.into_deserializer()).map(InputValue::Scalar)
106105
}
107106

108-
serde_if_integer128! {
109-
fn visit_i128<E: de::Error>(self, n: i128) -> Result<Self::Value, E> {
110-
S::deserialize(n.into_deserializer()).map(InputValue::Scalar)
111-
}
107+
fn visit_i128<E: de::Error>(self, n: i128) -> Result<Self::Value, E> {
108+
S::deserialize(n.into_deserializer()).map(InputValue::Scalar)
112109
}
113110

114111
fn visit_u8<E: de::Error>(self, n: u8) -> Result<Self::Value, E> {
@@ -127,10 +124,8 @@ impl<'de, S: Deserialize<'de>> Deserialize<'de> for InputValue<S> {
127124
S::deserialize(n.into_deserializer()).map(InputValue::Scalar)
128125
}
129126

130-
serde_if_integer128! {
131-
fn visit_u128<E: de::Error>(self, n: u128) -> Result<Self::Value, E> {
132-
S::deserialize(n.into_deserializer()).map(InputValue::Scalar)
133-
}
127+
fn visit_u128<E: de::Error>(self, n: u128) -> Result<Self::Value, E> {
128+
S::deserialize(n.into_deserializer()).map(InputValue::Scalar)
134129
}
135130

136131
fn visit_f32<E: de::Error>(self, n: f32) -> Result<Self::Value, E> {

tests/codegen/fail/input-object/derive_incompatible_field_type.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ error[E0277]: the trait bound `ObjectA: IsInputType<__S>` is not satisfied
1818
error[E0277]: the trait bound `ObjectA: FromInputValue<__S>` is not satisfied
1919
--> fail/input-object/derive_incompatible_field_type.rs:10:12
2020
|
21-
8 | #[derive(GraphQLInputObject)]
21+
8 | #[derive(GraphQLInputObject)]
2222
| ------------------ required by a bound introduced by this call
23-
9 | struct Object {
23+
9 | struct Object {
2424
10 | field: ObjectA,
2525
| ^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjectA`
2626
|

tests/codegen/fail/interface/struct/derive_cyclic_impl.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0391]: cycle detected when expanding type alias `Node1Value`
22
--> fail/interface/struct/derive_cyclic_impl.rs:4:36
33
|
4-
4 | #[graphql(impl = Node2Value, for = Node2Value)]
4+
4 | #[graphql(impl = Node2Value, for = Node2Value)]
55
| ^^^^^^^^^^
66
|
77
note: ...which requires expanding type alias `Node2Value`...
@@ -16,7 +16,7 @@ note: ...which requires expanding type alias `Node2Value`...
1616
note: cycle used when computing type of `<impl at $DIR/fail/interface/struct/derive_cyclic_impl.rs:3:10: 3:26>`
1717
--> fail/interface/struct/derive_cyclic_impl.rs:3:10
1818
|
19-
3 | #[derive(GraphQLInterface)]
19+
3 | #[derive(GraphQLInterface)]
2020
| ^^^^^^^^^^^^^^^^
2121
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
2222
= note: this error originates in the derive macro `GraphQLInterface` (in Nightly builds, run with -Z macro-backtrace for more info)

tests/codegen/fail/interface/trait/argument_non_input_type.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ error[E0277]: the trait bound `ObjA: IsInputType<__S>` is not satisfied
1818
error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
1919
--> fail/interface/trait/argument_non_input_type.rs:10:23
2020
|
21-
8 | #[graphql_interface]
21+
8 | #[graphql_interface]
2222
| -------------------- required by a bound introduced by this call
23-
9 | trait Character {
23+
9 | trait Character {
2424
10 | fn id(&self, obj: ObjA) -> &str;
2525
| ^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
2626
|

0 commit comments

Comments
 (0)