events: Remove deprecated method NameEventContent::name
This commit is contained in:
parent
0d293dec70
commit
202fc5132a
@ -8,6 +8,7 @@ Breaking changes:
|
|||||||
* Replace `InvalidEvent` by a more specific `FromStringError` for room name
|
* Replace `InvalidEvent` by a more specific `FromStringError` for room name
|
||||||
validation
|
validation
|
||||||
* Remove unused `FromStrError`
|
* Remove unused `FromStrError`
|
||||||
|
* Remove deprecated method `room::name::NameEventContent::name`
|
||||||
|
|
||||||
# 0.23.3
|
# 0.23.3
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//! Types for the *m.room.name* event.
|
//! Types for the *m.room.name* event.
|
||||||
|
|
||||||
use ruma_events_macros::EventContent;
|
use ruma_events_macros::EventContent;
|
||||||
use ruma_identifiers::{RoomName, RoomNameBox};
|
use ruma_identifiers::RoomNameBox;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::StateEvent;
|
use crate::StateEvent;
|
||||||
@ -24,12 +24,6 @@ impl NameEventContent {
|
|||||||
pub fn new(name: Option<RoomNameBox>) -> Self {
|
pub fn new(name: Option<RoomNameBox>) -> Self {
|
||||||
Self { name }
|
Self { name }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The name of the room, if any.
|
|
||||||
#[deprecated = "You can access the name field directly."]
|
|
||||||
pub fn name(&self) -> Option<&RoomName> {
|
|
||||||
self.name.as_deref()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user