@@ -5,8 +5,6 @@ use crate::format::{format_directives, Displayable, Formatter, Style};
5
5
use crate :: query:: ast:: * ;
6
6
7
7
impl < ' a , T : Text < ' a > > Document < ' a , T >
8
- where
9
- T : Text < ' a > ,
10
8
{
11
9
/// Format a document according to style
12
10
pub fn format ( & self , style : & Style ) -> String {
@@ -24,8 +22,6 @@ fn to_string<T: Displayable>(v: &T) -> String {
24
22
}
25
23
26
24
impl < ' a , T : Text < ' a > > Displayable for Document < ' a , T >
27
- where
28
- T : Text < ' a > ,
29
25
{
30
26
fn display ( & self , f : & mut Formatter ) {
31
27
for item in & self . definitions {
35
31
}
36
32
37
33
impl < ' a , T : Text < ' a > > Displayable for Definition < ' a , T >
38
- where
39
- T : Text < ' a > ,
40
34
{
41
35
fn display ( & self , f : & mut Formatter ) {
42
36
match * self {
47
41
}
48
42
49
43
impl < ' a , T : Text < ' a > > Displayable for OperationDefinition < ' a , T >
50
- where
51
- T : Text < ' a > ,
52
44
{
53
45
fn display ( & self , f : & mut Formatter ) {
54
46
match * self {
61
53
}
62
54
63
55
impl < ' a , T : Text < ' a > > Displayable for FragmentDefinition < ' a , T >
64
- where
65
- T : Text < ' a > ,
66
56
{
67
57
fn display ( & self , f : & mut Formatter ) {
68
58
f. margin ( ) ;
82
72
}
83
73
84
74
impl < ' a , T : Text < ' a > > Displayable for SelectionSet < ' a , T >
85
- where
86
- T : Text < ' a > ,
87
75
{
88
76
fn display ( & self , f : & mut Formatter ) {
89
77
f. margin ( ) ;
97
85
}
98
86
99
87
impl < ' a , T : Text < ' a > > Displayable for Selection < ' a , T >
100
- where
101
- T : Text < ' a > ,
102
88
{
103
89
fn display ( & self , f : & mut Formatter ) {
104
90
match * self {
110
96
}
111
97
112
98
fn format_arguments < ' a , T : Text < ' a > > ( arguments : & [ ( T :: Value , Value < ' a , T > ) ] , f : & mut Formatter )
113
- where
114
- T : Text < ' a > ,
115
99
{
116
100
if !arguments. is_empty ( ) {
117
101
f. start_argument_block ( '(' ) ;
@@ -131,8 +115,6 @@ where
131
115
}
132
116
133
117
impl < ' a , T : Text < ' a > > Displayable for Field < ' a , T >
134
- where
135
- T : Text < ' a > ,
136
118
{
137
119
fn display ( & self , f : & mut Formatter ) {
138
120
f. indent ( ) ;
@@ -157,8 +139,6 @@ where
157
139
}
158
140
159
141
impl < ' a , T : Text < ' a > > Displayable for Query < ' a , T >
160
- where
161
- T : Text < ' a > ,
162
142
{
163
143
fn display ( & self , f : & mut Formatter ) {
164
144
f. margin ( ) ;
@@ -188,8 +168,6 @@ where
188
168
}
189
169
190
170
impl < ' a , T : Text < ' a > > Displayable for Mutation < ' a , T >
191
- where
192
- T : Text < ' a > ,
193
171
{
194
172
fn display ( & self , f : & mut Formatter ) {
195
173
f. margin ( ) ;
@@ -219,8 +197,6 @@ where
219
197
}
220
198
221
199
impl < ' a , T : Text < ' a > > Displayable for Subscription < ' a , T >
222
- where
223
- T : Text < ' a > ,
224
200
{
225
201
fn display ( & self , f : & mut Formatter ) {
226
202
f. margin ( ) ;
@@ -248,8 +224,6 @@ where
248
224
}
249
225
250
226
impl < ' a , T : Text < ' a > > Displayable for VariableDefinition < ' a , T >
251
- where
252
- T : Text < ' a > ,
253
227
{
254
228
fn display ( & self , f : & mut Formatter ) {
255
229
f. write ( "$" ) ;
@@ -264,8 +238,6 @@ where
264
238
}
265
239
266
240
impl < ' a , T : Text < ' a > > Displayable for Type < ' a , T >
267
- where
268
- T : Text < ' a > ,
269
241
{
270
242
fn display ( & self , f : & mut Formatter ) {
271
243
match * self {
@@ -284,8 +256,6 @@ where
284
256
}
285
257
286
258
impl < ' a , T : Text < ' a > > Displayable for Value < ' a , T >
287
- where
288
- T : Text < ' a > ,
289
259
{
290
260
fn display ( & self , f : & mut Formatter ) {
291
261
match * self {
@@ -334,8 +304,6 @@ where
334
304
}
335
305
336
306
impl < ' a , T : Text < ' a > > Displayable for InlineFragment < ' a , T >
337
- where
338
- T : Text < ' a > ,
339
307
{
340
308
fn display ( & self , f : & mut Formatter ) {
341
309
f. indent ( ) ;
@@ -355,8 +323,6 @@ where
355
323
}
356
324
357
325
impl < ' a , T : Text < ' a > > Displayable for TypeCondition < ' a , T >
358
- where
359
- T : Text < ' a > ,
360
326
{
361
327
fn display ( & self , f : & mut Formatter ) {
362
328
match * self {
@@ -369,8 +335,6 @@ where
369
335
}
370
336
371
337
impl < ' a , T : Text < ' a > > Displayable for FragmentSpread < ' a , T >
372
- where
373
- T : Text < ' a > ,
374
338
{
375
339
fn display ( & self , f : & mut Formatter ) {
376
340
f. indent ( ) ;
@@ -382,8 +346,6 @@ where
382
346
}
383
347
384
348
impl < ' a , T : Text < ' a > > Displayable for Directive < ' a , T >
385
- where
386
- T : Text < ' a > ,
387
349
{
388
350
fn display ( & self , f : & mut Formatter ) {
389
351
f. write ( "@" ) ;
0 commit comments