Make clippy happy
This commit is contained in:
parent
9a1c8ec66e
commit
a5c5b0b137
@ -87,8 +87,7 @@ impl EventContent for RedactedRoomAliasesEventContent {
|
||||
fn from_parts(event_type: &str, content: &RawJsonValue) -> serde_json::Result<Self> {
|
||||
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}`",
|
||||
)));
|
||||
}
|
||||
|
||||
|
@ -199,8 +199,7 @@ impl EventContent for RedactedRoomMemberEventContent {
|
||||
fn from_parts(event_type: &str, content: &RawJsonValue) -> serde_json::Result<Self> {
|
||||
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}`",
|
||||
)));
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
| ^^^^^^^
|
||||
|
@ -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}`",
|
||||
),
|
||||
));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user