From 24893223b202061e09049aed75a8d1e255dbff39 Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 20 Nov 2020 01:30:12 +0100 Subject: [PATCH] remove unused code and fix lint warning --- derive/src/method.rs | 4 ---- src/lib.rs | 2 +- tests/ui/method_async_state.stderr | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/derive/src/method.rs b/derive/src/method.rs index a791637..f892734 100644 --- a/derive/src/method.rs +++ b/derive/src/method.rs @@ -110,10 +110,6 @@ enum MethodArgumentType { } impl MethodArgumentType { - fn is_state_ref(&self) -> bool { - matches!(self, Self::StateRef | Self::StateMutRef) - } - fn is_method_arg(&self) -> bool { matches!(self, Self::MethodArg(_)) } diff --git a/src/lib.rs b/src/lib.rs index a45dc83..c030d37 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ #![allow(clippy::tabs_in_doc_comments)] #![warn(missing_debug_implementations, rust_2018_idioms)] -#![deny(intra_doc_link_resolution_failure)] +#![deny(broken_intra_doc_links)] /*! This crate is an extension to the popular [gotham web framework][gotham] for Rust. It allows you to create resources with assigned methods that aim to be a more convenient way of creating handlers diff --git a/tests/ui/method_async_state.stderr b/tests/ui/method_async_state.stderr index 5c02836..4581a45 100644 --- a/tests/ui/method_async_state.stderr +++ b/tests/ui/method_async_state.stderr @@ -1,4 +1,4 @@ -error: async fn must not take &State as an argument as State is not Sync, consider boxing +error: async fn must not take &State as an argument as State is not Sync, consider taking &mut State --> $DIR/method_async_state.rs:9:19 | 9 | async fn read_all(state : &State)