macros: Rename is_room to is_timeline
This commit is contained in:
parent
df971d2c5c
commit
956871cfa6
@ -474,7 +474,7 @@ fn expand_accessor_methods(
|
|||||||
let self_variants: Vec<_> = variants.iter().map(|v| v.match_arm(quote! { Self })).collect();
|
let self_variants: Vec<_> = variants.iter().map(|v| v.match_arm(quote! { Self })).collect();
|
||||||
|
|
||||||
let maybe_redacted =
|
let maybe_redacted =
|
||||||
kind.is_room() && matches!(var, EventEnumVariation::None | EventEnumVariation::Sync);
|
kind.is_timeline() && matches!(var, EventEnumVariation::None | EventEnumVariation::Sync);
|
||||||
|
|
||||||
let event_type_match_arms = if maybe_redacted {
|
let event_type_match_arms = if maybe_redacted {
|
||||||
quote! {
|
quote! {
|
||||||
|
@ -121,7 +121,7 @@ impl EventKind {
|
|||||||
matches!(self, Self::GlobalAccountData | Self::RoomAccountData)
|
matches!(self, Self::GlobalAccountData | Self::RoomAccountData)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_room(self) -> bool {
|
pub fn is_timeline(self) -> bool {
|
||||||
matches!(self, Self::MessageLike | Self::RoomRedaction | Self::State)
|
matches!(self, Self::MessageLike | Self::RoomRedaction | Self::State)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user