diff --git a/crates/ruma-common/src/events/room/aliases.rs b/crates/ruma-common/src/events/room/aliases.rs index 667012e2..26dd13ae 100644 --- a/crates/ruma-common/src/events/room/aliases.rs +++ b/crates/ruma-common/src/events/room/aliases.rs @@ -87,8 +87,7 @@ impl EventContent for RedactedRoomAliasesEventContent { fn from_parts(event_type: &str, content: &RawJsonValue) -> serde_json::Result { if event_type != "m.room.aliases" { return Err(::serde::de::Error::custom(format!( - "expected event type `m.room.aliases`, found `{}`", - event_type + "expected event type `m.room.aliases`, found `{event_type}`", ))); } diff --git a/crates/ruma-common/src/events/room/member.rs b/crates/ruma-common/src/events/room/member.rs index 0c14c041..0fd5ad7c 100644 --- a/crates/ruma-common/src/events/room/member.rs +++ b/crates/ruma-common/src/events/room/member.rs @@ -199,8 +199,7 @@ impl EventContent for RedactedRoomMemberEventContent { fn from_parts(event_type: &str, content: &RawJsonValue) -> serde_json::Result { if event_type != "m.room.member" { return Err(::serde::de::Error::custom(format!( - "expected event type `m.room.member`, found `{}`", - event_type + "expected event type `m.room.member`, found `{event_type}`", ))); } diff --git a/crates/ruma-common/tests/events/ui/09-enum-invalid-kind.stderr b/crates/ruma-common/tests/events/ui/09-enum-invalid-kind.stderr index 8c9e2cce..ab5bb24d 100644 --- a/crates/ruma-common/tests/events/ui/09-enum-invalid-kind.stderr +++ b/crates/ruma-common/tests/events/ui/09-enum-invalid-kind.stderr @@ -1,5 +1,5 @@ -error: valid event kinds are GlobalAccountData, RoomAccountData, EphemeralRoom, MessageLike, State, ToDevice found `NotReal` - --> $DIR/09-enum-invalid-kind.rs:4:10 +error: valid event kinds are GlobalAccountData, RoomAccountData, EphemeralRoom, MessageLike, State, ToDevice; found `NotReal` + --> tests/events/ui/09-enum-invalid-kind.rs:4:10 | 4 | enum NotReal { | ^^^^^^^ diff --git a/crates/ruma-macros/src/events/event_parse.rs b/crates/ruma-macros/src/events/event_parse.rs index 44e28e20..43cba615 100644 --- a/crates/ruma-macros/src/events/event_parse.rs +++ b/crates/ruma-macros/src/events/event_parse.rs @@ -138,10 +138,7 @@ impl EventKind { | (Self::State, V::Stripped | V::Initial) => Ok(format_ident!("{var}{self}")), _ => Err(syn::Error::new( Span::call_site(), - format!( - "({:?}, {:?}) is not a valid event kind / variation combination", - self, var - ), + format!("({self:?}, {var:?}) is not a valid event kind / variation combination"), )), } } @@ -175,8 +172,7 @@ impl Parse for EventKind { ident, format!( "valid event kinds are GlobalAccountData, RoomAccountData, EphemeralRoom, \ - MessageLike, State, ToDevice found `{}`", - id + MessageLike, State, ToDevice; found `{id}`", ), )); }