diff --git a/src/registry/mod.rs b/src/registry/mod.rs index 30700d98..25b55b10 100644 --- a/src/registry/mod.rs +++ b/src/registry/mod.rs @@ -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; } } } diff --git a/src/registry/stringify_exec_doc.rs b/src/registry/stringify_exec_doc.rs index 1fe2ca19..5e741c63 100644 --- a/src/registry/stringify_exec_doc.rs +++ b/src/registry/stringify_exec_doc.rs @@ -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, diff --git a/src/types/any.rs b/src/types/any.rs index 738a1f7b..5f9189ba 100644 --- a/src/types/any.rs +++ b/src/types/any.rs @@ -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 diff --git a/src/validation/visitor.rs b/src/validation/visitor.rs index 8e8953f7..7b11d907 100644 --- a/src/validation/visitor.rs +++ b/src/validation/visitor.rs @@ -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);