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