events: Fix name of internal helper method

This commit is contained in:
Jonas Platte 2022-04-01 17:25:25 +02:00
parent d87874314b
commit 51244d5ae7
No known key found for this signature in database
GPG Key ID: BBA95679259D342F
2 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ impl<C: StateEventContent> StateUnsigned<C> {
})
}
pub fn _map_prev_unsigned<T>(&self, f: impl FnOnce(&C) -> T) -> StateUnsigned<T>
pub fn _map_prev_content<T>(&self, f: impl FnOnce(&C) -> T) -> StateUnsigned<T>
where
T: StateEventContent,
{

View File

@ -454,13 +454,13 @@ fn expand_accessor_methods(
match self {
#(
#self_variants(event) => {
event.unsigned._map_prev_unsigned(|c| {
event.unsigned._map_prev_content(|c| {
#content_variants(c.clone())
})
},
)*
Self::_Custom(event) => {
event.unsigned._map_prev_unsigned(|c| #content_enum::_Custom {
event.unsigned._map_prev_content(|c| #content_enum::_Custom {
event_type: crate::PrivOwnedStr(
::std::convert::From::from(
::std::string::ToString::to_string(