macros: Fix inconsistent naming
This commit is contained in:
parent
22541ba92f
commit
44ed91a5af
@ -31,7 +31,7 @@ enum EventMeta {
|
|||||||
|
|
||||||
/// Fields marked with `#[ruma_event(skip_redaction)]` are kept when the event is
|
/// Fields marked with `#[ruma_event(skip_redaction)]` are kept when the event is
|
||||||
/// redacted.
|
/// redacted.
|
||||||
SkipRedacted,
|
SkipRedaction,
|
||||||
|
|
||||||
/// This attribute signals that the events redacted form is manually implemented and should not
|
/// This attribute signals that the events redacted form is manually implemented and should not
|
||||||
/// be generated.
|
/// be generated.
|
||||||
@ -67,7 +67,7 @@ impl Parse for EventMeta {
|
|||||||
EventKind::parse(input).map(EventMeta::Kind)
|
EventKind::parse(input).map(EventMeta::Kind)
|
||||||
} else if lookahead.peek(kw::skip_redaction) {
|
} else if lookahead.peek(kw::skip_redaction) {
|
||||||
let _: kw::skip_redaction = input.parse()?;
|
let _: kw::skip_redaction = input.parse()?;
|
||||||
Ok(EventMeta::SkipRedacted)
|
Ok(EventMeta::SkipRedaction)
|
||||||
} else if lookahead.peek(kw::custom_redacted) {
|
} else if lookahead.peek(kw::custom_redacted) {
|
||||||
let _: kw::custom_redacted = input.parse()?;
|
let _: kw::custom_redacted = input.parse()?;
|
||||||
Ok(EventMeta::CustomRedacted)
|
Ok(EventMeta::CustomRedacted)
|
||||||
@ -207,7 +207,7 @@ fn generate_redacted_event_content(
|
|||||||
.filter(|f| {
|
.filter(|f| {
|
||||||
matches!(
|
matches!(
|
||||||
f.attrs.iter().find_map(|a| a.parse_args::<EventMeta>().ok()),
|
f.attrs.iter().find_map(|a| a.parse_args::<EventMeta>().ok()),
|
||||||
Some(EventMeta::SkipRedacted)
|
Some(EventMeta::SkipRedaction)
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.cloned()
|
.cloned()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user