Skip to content

Commit

Permalink
Fix fmt warning for visit_all_rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jerel committed Feb 13, 2021
1 parent c358d5e commit f984237
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions juniper/src/schema/meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,10 @@ impl<'a, S> MetaType<'a, S> {
///
/// Objects, interfaces, and unions are composite.
pub fn is_composite(&self) -> bool {
matches!(*self, MetaType::Object(_) | MetaType::Interface(_) | MetaType::Union(_))
matches!(
*self,
MetaType::Object(_) | MetaType::Interface(_) | MetaType::Union(_)
)
}

/// Returns true if the type can occur in leaf positions in queries
Expand All @@ -369,7 +372,10 @@ impl<'a, S> MetaType<'a, S> {
///
/// Only scalars, enums, and input objects are input types.
pub fn is_input(&self) -> bool {
matches!(*self, MetaType::Scalar(_) | MetaType::Enum(_) | MetaType::InputObject(_))
matches!(
*self,
MetaType::Scalar(_) | MetaType::Enum(_) | MetaType::InputObject(_)
)
}

/// Returns true if the type is built-in to GraphQL.
Expand Down
2 changes: 1 addition & 1 deletion juniper/src/validation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ mod visitor;
#[cfg(test)]
pub(crate) mod test_harness;

pub use self::rules::visit_all_rules;
pub use self::{
context::{RuleError, ValidatorContext},
input_value::validate_input_values,
multi_visitor::MultiVisitorNil,
rules::visit_all_rules,
traits::Visitor,
visitor::visit,
};
Expand Down

0 comments on commit f984237

Please sign in to comment.