From 355b46243158415a331e5ed583bee8203751a496 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Tue, 13 Apr 2021 13:17:09 +0200 Subject: [PATCH] events-macros: Make methods on `Copy` type take self by value --- ruma-events-macros/src/event_parse.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruma-events-macros/src/event_parse.rs b/ruma-events-macros/src/event_parse.rs index a2980c43..87b90e7a 100644 --- a/ruma-events-macros/src/event_parse.rs +++ b/ruma-events-macros/src/event_parse.rs @@ -43,11 +43,11 @@ impl fmt::Display for EventKindVariation { } impl EventKindVariation { - pub fn is_redacted(&self) -> bool { + pub fn is_redacted(self) -> bool { matches!(self, Self::Redacted | Self::RedactedSync | Self::RedactedStripped) } - pub fn to_full_variation(&self) -> Self { + pub fn to_full_variation(self) -> Self { match self { EventKindVariation::Redacted | EventKindVariation::RedactedSync