Clippy clean
This commit is contained in:
parent
1f479c5211
commit
e4c3da6ae9
|
@ -25,7 +25,7 @@ fn strip_brackets(type_name: &str) -> Option<&str> {
|
|||
.map(|rest| &rest[..rest.len() - 1])
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Debug)]
|
||||
#[derive(Clone, Copy, Eq, PartialEq, Debug)]
|
||||
pub enum MetaTypeName<'a> {
|
||||
List(&'a str),
|
||||
NonNull(&'a str),
|
||||
|
@ -499,7 +499,7 @@ impl Registry {
|
|||
},
|
||||
);
|
||||
let ty = f(self);
|
||||
*self.types.get_mut(&*name).unwrap() = ty;
|
||||
*self.types.get_mut(name).unwrap() = ty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ impl Registry {
|
|||
self.stringify_fragment_definition(
|
||||
&mut output,
|
||||
variables,
|
||||
&*name,
|
||||
name,
|
||||
self.types
|
||||
.get(fragment.node.type_condition.node.on.node.as_str()),
|
||||
&fragment.node,
|
||||
|
|
|
@ -4,7 +4,7 @@ use crate::{InputValueResult, Scalar, ScalarType, Value};
|
|||
///
|
||||
/// The `Any` scalar is used to pass representations of entities from external
|
||||
/// services into the root `_entities` field for execution.
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
#[derive(Clone, Eq, PartialEq, Debug)]
|
||||
pub struct Any(pub Value);
|
||||
|
||||
/// The `_Any` scalar is used to pass representations of entities from external
|
||||
|
|
|
@ -557,7 +557,7 @@ fn visit_operation_definition<'a, V: Visitor<'a>>(
|
|||
OperationType::Subscription => ctx.registry.subscription_type.as_deref(),
|
||||
};
|
||||
if let Some(root_name) = root_name {
|
||||
ctx.with_type(Some(&ctx.registry.types[&*root_name]), |ctx| {
|
||||
ctx.with_type(Some(&ctx.registry.types[root_name]), |ctx| {
|
||||
visit_variable_definitions(v, ctx, &operation.node.variable_definitions);
|
||||
visit_directives(v, ctx, &operation.node.directives);
|
||||
visit_selection_set(v, ctx, &operation.node.selection_set);
|
||||
|
|
Loading…
Reference in New Issue