Skip to content

Commit

Permalink
feat(smith): add DocumentBuilder::input_exhausted
Browse files Browse the repository at this point in the history
This indicates we might have run into rust-fuzz/arbitrary#139
  • Loading branch information
SimonSapin committed Jan 17, 2023
1 parent 3ad6337 commit 161fea2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/apollo-smith/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ impl<'a> DocumentBuilder<'a> {
Ok(builder)
}

/// Returns whether the provided `Unstructured` is now empty
pub fn input_exhausted(&self) -> bool {
self.u.is_empty()
}

/// Convert a `DocumentBuilder` into a GraphQL `Document`
pub fn finish(self) -> Document {
Document {
Expand Down

0 comments on commit 161fea2

Please sign in to comment.