Skip to content

Commit fddd791

Browse files
committed
Temp
1 parent 0b53da7 commit fddd791

15 files changed

+407
-467
lines changed

crates/apollo-smith/src/next/ast/directive_definition.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use super::document::DocumentExt;
2+
use crate::next::unstructured::Unstructured;
23
use apollo_compiler::ast::{
34
Argument, Directive, DirectiveDefinition, DirectiveList, DirectiveLocation, Document,
45
};
56
use apollo_compiler::{Node, Schema};
6-
use arbitrary::Unstructured;
77
use std::ops::Deref;
88

99
pub(crate) struct LocationFilter<I>(I, DirectiveLocation);
@@ -27,7 +27,6 @@ pub(crate) trait DirectiveDefinitionIterExt {
2727
fn try_collect<'a>(
2828
self,
2929
u: &mut Unstructured,
30-
doc: &Document,
3130
schema: &Schema,
3231
) -> arbitrary::Result<DirectiveList>
3332
where
@@ -46,7 +45,6 @@ impl<I: ?Sized> DirectiveDefinitionIterExt for I {
4645
fn try_collect<'a>(
4746
mut self,
4847
u: &mut Unstructured,
49-
doc: &Document,
5048
schema: &Schema,
5149
) -> arbitrary::Result<DirectiveList>
5250
where
@@ -59,7 +57,7 @@ impl<I: ?Sized> DirectiveDefinitionIterExt for I {
5957
if arg.is_required() || u.arbitrary()? {
6058
arguments.push(Node::new(Argument {
6159
name: arg.name.clone(),
62-
value: Node::new(doc.arbitrary_value(u, arg.ty.deref(), schema)?),
60+
value: Node::new(u.arbitrary_value(arg.ty.deref(), schema)?),
6361
}))
6462
}
6563
}

0 commit comments

Comments
 (0)