@@ -26,7 +26,6 @@ macro_rules! event_handler {
2626 $( #[ deprecated = $deprecated] ) ?
2727 async fn $method_name( & self , $( $context: Context , ) ? $( $arg_name: $arg_type ) ,* ) {
2828 // Suppress unused argument warnings
29- #[ allow( dropping_references, dropping_copy_types) ]
3029 drop( ( $( $context, ) ? $( $arg_name) ,* ) )
3130 }
3231 ) *
@@ -43,10 +42,7 @@ macro_rules! event_handler {
4342 /// in a timely manner. It is recommended to keep the runtime
4443 /// complexity of the filter code low to avoid unnecessarily blocking
4544 /// your bot.
46- fn filter_event( & self , context: & Context , event: & Event ) -> bool {
47- // Suppress unused argument warnings
48- #[ allow( dropping_references, dropping_copy_types) ]
49- drop( ( context, event) ) ;
45+ fn filter_event( & self , _context: & Context , _event: & Event ) -> bool {
5046 true
5147 }
5248 }
@@ -79,7 +75,6 @@ macro_rules! event_handler {
7975 /// ```
8076 #[ must_use]
8177 pub fn snake_case_name( & self ) -> & ' static str {
82- #[ allow( deprecated) ]
8378 match self {
8479 $(
8580 $( #[ cfg( feature = $feature) ] ) ?
@@ -90,7 +85,6 @@ macro_rules! event_handler {
9085
9186 /// Runs the given [`EventHandler`]'s code for this event.
9287 pub async fn dispatch( self , ctx: Context , handler: & dyn EventHandler ) {
93- #[ allow( deprecated) ]
9488 match self {
9589 $(
9690 $( #[ cfg( feature = $feature) ] ) ?
@@ -527,10 +521,8 @@ pub trait RawEventHandler: Send + Sync {
527521 /// in a timely manner. It is recommended to keep the runtime
528522 /// complexity of the filter code low to avoid unnecessarily blocking
529523 /// your bot.
530- fn filter_event ( & self , context : & Context , event : & Event ) -> bool {
524+ fn filter_event ( & self , _context : & Context , _event : & Event ) -> bool {
531525 // Suppress unused argument warnings
532- #[ allow( dropping_references, dropping_copy_types) ]
533- drop ( ( context, event) ) ;
534526 true
535527 }
536528}
0 commit comments