Skip to content

Commit a90a1f5

Browse files
committed
Change feature to "arbitrary1".
1 parent 29889f6 commit a90a1f5

File tree

9 files changed

+41
-41
lines changed

9 files changed

+41
-41
lines changed

juniper/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ default = [
3131
"url",
3232
"uuid",
3333
]
34-
arbitrary = ["dep:arbitrary", "smartstring/arbitrary"]
34+
arbitrary1 = ["dep:arbitrary", "smartstring/arbitrary"]
3535
bigdecimal = ["dep:bigdecimal", "dep:num-bigint", "dep:ryu"]
3636
bson = ["dep:bson"]
3737
chrono = ["dep:chrono"]

juniper/src/ast.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub enum Type<'a> {
2828
NonNullList(Box<Type<'a>>, Option<usize>),
2929
}
3030

31-
#[cfg(feature = "arbitrary")]
31+
#[cfg(feature = "arbitrary1")]
3232
impl<'a> arbitrary::Arbitrary<'a> for Type<'a> {
3333
fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result<Self> {
3434
let num_choices = 4;
@@ -57,7 +57,7 @@ impl<'a> arbitrary::Arbitrary<'a> for Type<'a> {
5757
/// Lists and objects variants are _spanned_, i.e. they contain a reference to
5858
/// their position in the source file, if available.
5959
#[derive(Clone, Debug, PartialEq)]
60-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
60+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
6161
pub enum InputValue<S = DefaultScalarValue> {
6262
Null,
6363
Scalar(S),
@@ -75,7 +75,7 @@ pub struct VariableDefinition<'a, S> {
7575
pub directives: Option<Vec<Spanning<Directive<'a, S>>>>,
7676
}
7777

78-
#[cfg(feature = "arbitrary")]
78+
#[cfg(feature = "arbitrary1")]
7979
impl<'a, S> arbitrary::Arbitrary<'a> for VariableDefinition<'a, S>
8080
where
8181
S: arbitrary::Arbitrary<'a>,
@@ -99,7 +99,7 @@ pub struct Arguments<'a, S> {
9999
pub items: Vec<(Spanning<&'a str>, Spanning<InputValue<S>>)>,
100100
}
101101

102-
#[cfg(feature = "arbitrary")]
102+
#[cfg(feature = "arbitrary1")]
103103
impl<'a, S> arbitrary::Arbitrary<'a> for Arguments<'a, S>
104104
where
105105
S: arbitrary::Arbitrary<'a>,
@@ -116,7 +116,7 @@ pub struct VariableDefinitions<'a, S> {
116116
pub items: Vec<(Spanning<&'a str>, VariableDefinition<'a, S>)>,
117117
}
118118

119-
#[cfg(feature = "arbitrary")]
119+
#[cfg(feature = "arbitrary1")]
120120
impl<'a, S> arbitrary::Arbitrary<'a> for VariableDefinitions<'a, S>
121121
where
122122
S: arbitrary::Arbitrary<'a>,
@@ -137,7 +137,7 @@ pub struct Field<'a, S> {
137137
pub selection_set: Option<Vec<Selection<'a, S>>>,
138138
}
139139

140-
#[cfg(feature = "arbitrary")]
140+
#[cfg(feature = "arbitrary1")]
141141
impl<'a, S> arbitrary::Arbitrary<'a> for Field<'a, S>
142142
where
143143
S: arbitrary::Arbitrary<'a>,
@@ -166,7 +166,7 @@ pub struct FragmentSpread<'a, S> {
166166
pub directives: Option<Vec<Spanning<Directive<'a, S>>>>,
167167
}
168168

169-
#[cfg(feature = "arbitrary")]
169+
#[cfg(feature = "arbitrary1")]
170170
impl<'a, S> arbitrary::Arbitrary<'a> for FragmentSpread<'a, S>
171171
where
172172
S: arbitrary::Arbitrary<'a>,
@@ -187,7 +187,7 @@ pub struct InlineFragment<'a, S> {
187187
pub selection_set: Vec<Selection<'a, S>>,
188188
}
189189

190-
#[cfg(feature = "arbitrary")]
190+
#[cfg(feature = "arbitrary1")]
191191
impl<'a, S> arbitrary::Arbitrary<'a> for InlineFragment<'a, S>
192192
where
193193
S: arbitrary::Arbitrary<'a>,
@@ -228,7 +228,7 @@ pub enum Selection<'a, S = DefaultScalarValue> {
228228
InlineFragment(Spanning<InlineFragment<'a, S>>),
229229
}
230230

231-
#[cfg(feature = "arbitrary")]
231+
#[cfg(feature = "arbitrary1")]
232232
impl<'a, S> arbitrary::Arbitrary<'a> for Selection<'a, S>
233233
where
234234
S: arbitrary::Arbitrary<'a>,
@@ -253,7 +253,7 @@ pub struct Directive<'a, S> {
253253
pub arguments: Option<Spanning<Arguments<'a, S>>>,
254254
}
255255

256-
#[cfg(feature = "arbitrary")]
256+
#[cfg(feature = "arbitrary1")]
257257
impl<'a, S> arbitrary::Arbitrary<'a> for Directive<'a, S>
258258
where
259259
S: arbitrary::Arbitrary<'a>,
@@ -267,7 +267,7 @@ where
267267

268268
#[allow(missing_docs)]
269269
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
270-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
270+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
271271
pub enum OperationType {
272272
Query,
273273
Mutation,

juniper/src/parser/lexer.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub struct Lexer<'a> {
2121
///
2222
/// This is only used for tagging how the lexer has interpreted a value literal
2323
#[allow(missing_docs)]
24-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
24+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
2525
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
2626
pub enum ScalarToken<'a> {
2727
String(&'a str),
@@ -31,7 +31,7 @@ pub enum ScalarToken<'a> {
3131

3232
/// A single token in the input source
3333
#[allow(missing_docs)]
34-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
34+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
3535
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
3636
pub enum Token<'a> {
3737
Name(&'a str),

juniper/src/parser/utils.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::fmt;
22

33
/// A reference to a line and column in an input source file
44
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Copy)]
5-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
5+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
66
pub struct SourcePosition {
77
index: usize,
88
line: usize,
@@ -15,7 +15,7 @@ pub struct SourcePosition {
1515
/// character pointed by the `start` field and ending just before the `end`
1616
/// marker.
1717
#[derive(Debug, Clone, PartialEq, Eq, Hash, Copy)]
18-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
18+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
1919
pub struct Spanning<T> {
2020
/// The wrapped item
2121
pub item: T,

juniper/src/schema/meta.rs

+16-16
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::{
1717

1818
/// Whether an item is deprecated, with context.
1919
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
20-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
20+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
2121
pub enum DeprecationStatus {
2222
/// The field/variant is not deprecated.
2323
Current,
@@ -62,7 +62,7 @@ pub type InputValueParseFn<S> = for<'b> fn(&'b InputValue<S>) -> Result<(), Fiel
6262
pub type ScalarTokenParseFn<S> = for<'b> fn(ScalarToken<'b>) -> Result<S, ParseError>;
6363

6464

65-
#[cfg(feature = "arbitrary")]
65+
#[cfg(feature = "arbitrary1")]
6666
impl<'a, S> arbitrary::Arbitrary<'a> for ScalarMeta<'a, S>
6767
where
6868
S: arbitrary::Arbitrary<'a>,
@@ -121,7 +121,7 @@ where
121121

122122
/// List type metadata
123123
#[derive(Debug)]
124-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
124+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
125125
pub struct ListMeta<'a> {
126126
#[doc(hidden)]
127127
pub of_type: Type<'a>,
@@ -132,15 +132,15 @@ pub struct ListMeta<'a> {
132132

133133
/// Nullable type metadata
134134
#[derive(Debug)]
135-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
135+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
136136
pub struct NullableMeta<'a> {
137137
#[doc(hidden)]
138138
pub of_type: Type<'a>,
139139
}
140140

141141
/// Object type metadata
142142
#[derive(Debug)]
143-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
143+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
144144
pub struct ObjectMeta<'a, S> {
145145
#[doc(hidden)]
146146
pub name: Cow<'a, str>,
@@ -153,7 +153,7 @@ pub struct ObjectMeta<'a, S> {
153153
}
154154

155155
/// Enum type metadata
156-
//#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
156+
//#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
157157
pub struct EnumMeta<'a, S> {
158158
#[doc(hidden)]
159159
pub name: Cow<'a, str>,
@@ -164,7 +164,7 @@ pub struct EnumMeta<'a, S> {
164164
pub(crate) try_parse_fn: InputValueParseFn<S>,
165165
}
166166

167-
#[cfg(feature = "arbitrary")]
167+
#[cfg(feature = "arbitrary1")]
168168
impl<'a, S> arbitrary::Arbitrary<'a> for EnumMeta<'a, S>
169169
where
170170
S: arbitrary::Arbitrary<'a>,
@@ -205,7 +205,7 @@ where
205205

206206
/// Interface type metadata
207207
#[derive(Debug)]
208-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
208+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
209209
pub struct InterfaceMeta<'a, S> {
210210
#[doc(hidden)]
211211
pub name: Cow<'a, str>,
@@ -219,7 +219,7 @@ pub struct InterfaceMeta<'a, S> {
219219

220220
/// Union type metadata
221221
#[derive(Debug)]
222-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
222+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
223223
pub struct UnionMeta<'a> {
224224
#[doc(hidden)]
225225
pub name: Cow<'a, str>,
@@ -230,7 +230,7 @@ pub struct UnionMeta<'a> {
230230
}
231231

232232
/// Input object metadata
233-
//#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
233+
//#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
234234
pub struct InputObjectMeta<'a, S> {
235235
#[doc(hidden)]
236236
pub name: Cow<'a, str>,
@@ -241,7 +241,7 @@ pub struct InputObjectMeta<'a, S> {
241241
pub(crate) try_parse_fn: InputValueParseFn<S>,
242242
}
243243

244-
#[cfg(feature = "arbitrary")]
244+
#[cfg(feature = "arbitrary1")]
245245
impl<'a, S> arbitrary::Arbitrary<'a> for InputObjectMeta<'a, S>
246246
where
247247
S: arbitrary::Arbitrary<'a>,
@@ -285,7 +285,7 @@ where
285285
/// After a type's `meta` method has been called but before it has returned, a placeholder type
286286
/// is inserted into a registry to indicate existence.
287287
#[derive(Debug)]
288-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
288+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
289289
pub struct PlaceholderMeta<'a> {
290290
#[doc(hidden)]
291291
pub of_type: Type<'a>,
@@ -314,7 +314,7 @@ pub enum MetaType<'a, S = DefaultScalarValue> {
314314
Placeholder(PlaceholderMeta<'a>),
315315
}
316316

317-
#[cfg(feature = "arbitrary")]
317+
#[cfg(feature = "arbitrary1")]
318318
impl<'a, S> arbitrary::Arbitrary<'a> for MetaType<'a, S>
319319
where
320320
S: arbitrary::Arbitrary<'a>,
@@ -340,7 +340,7 @@ where
340340

341341
/// Metadata for a field
342342
#[derive(Debug, Clone)]
343-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
343+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
344344
pub struct Field<'a, S> {
345345
#[doc(hidden)]
346346
pub name: smartstring::alias::String,
@@ -364,7 +364,7 @@ impl<'a, S> Field<'a, S> {
364364

365365
/// Metadata for an argument to a field
366366
#[derive(Debug, Clone)]
367-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
367+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
368368
pub struct Argument<'a, S> {
369369
#[doc(hidden)]
370370
pub name: String,
@@ -386,7 +386,7 @@ impl<'a, S> Argument<'a, S> {
386386

387387
/// Metadata for a single value in an enum
388388
#[derive(Debug, Clone)]
389-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
389+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
390390
pub struct EnumValue {
391391
/// The name of the enum value
392392
///

juniper/src/schema/model.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub struct RootNode<
4747
pub schema: SchemaType<'a, S>,
4848
}
4949

50-
#[cfg(feature = "arbitrary")]
50+
#[cfg(feature = "arbitrary1")]
5151
impl<'a, QueryT, MutationT, SubscriptionT, S> arbitrary::Arbitrary<'a>
5252
for RootNode<'a, QueryT, MutationT, SubscriptionT, S>
5353
where
@@ -97,7 +97,7 @@ pub struct SchemaType<'a, S> {
9797

9898
impl<'a, S> Context for SchemaType<'a, S> {}
9999

100-
#[cfg(feature = "arbitrary")]
100+
#[cfg(feature = "arbitrary1")]
101101
impl<'a, S: 'a> arbitrary::Arbitrary<'a> for SchemaType<'a, S>
102102
where
103103
S: arbitrary::Arbitrary<'a>,
@@ -147,7 +147,7 @@ pub enum TypeType<'a, S: 'a> {
147147
List(Box<TypeType<'a, S>>, Option<usize>),
148148
}
149149

150-
#[cfg(feature = "arbitrary")]
150+
#[cfg(feature = "arbitrary1")]
151151
impl<'a, S: 'a> arbitrary::Arbitrary<'a> for TypeType<'a, S>
152152
where
153153
S: arbitrary::Arbitrary<'a>,
@@ -173,7 +173,7 @@ where
173173
}
174174

175175
#[derive(Debug)]
176-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
176+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
177177
pub struct DirectiveType<'a, S> {
178178
pub name: String,
179179
pub description: Option<String>,
@@ -183,7 +183,7 @@ pub struct DirectiveType<'a, S> {
183183
}
184184

185185
#[derive(Clone, PartialEq, Eq, Debug, GraphQLEnum)]
186-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
186+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
187187
#[graphql(name = "__DirectiveLocation", internal)]
188188
pub enum DirectiveLocation {
189189
Query,

juniper/src/types/name.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::{
66
};
77

88
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
9-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
9+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
1010
pub struct Name(String);
1111

1212
impl Name {

juniper/src/types/scalars.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ impl<T> Default for EmptyMutation<T> {
401401
}
402402
}
403403

404-
#[cfg(feature = "arbitrary")]
404+
#[cfg(feature = "arbitrary1")]
405405
impl<'a, T> arbitrary::Arbitrary<'a> for EmptyMutation<T>
406406
where
407407
T: arbitrary::Arbitrary<'a>,
@@ -472,7 +472,7 @@ impl<T> Default for EmptySubscription<T> {
472472
}
473473
}
474474

475-
#[cfg(feature = "arbitrary")]
475+
#[cfg(feature = "arbitrary1")]
476476
impl<'a, T> arbitrary::Arbitrary<'a> for EmptySubscription<T>
477477
where
478478
T: arbitrary::Arbitrary<'a>,

juniper/src/value/scalar.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ pub trait ScalarValue:
230230
///
231231
/// [0]: https://spec.graphql.org/October2021
232232
#[derive(Clone, Debug, PartialEq, ScalarValue, Serialize)]
233-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
233+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
234234
#[serde(untagged)]
235235
pub enum DefaultScalarValue {
236236
/// [`Int` scalar][0] as a signed 32‐bit numeric non‐fractional value.

0 commit comments

Comments
 (0)