Deprecate / remove re-exports from ruma_common

This commit is contained in:
Jonas Platte 2020-06-15 19:10:34 +02:00
parent 83d8f8c43e
commit 1d954f3089
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
3 changed files with 10 additions and 5 deletions

View File

@ -4,6 +4,7 @@ use std::{collections::BTreeMap, time::Duration};
use js_int::UInt; use js_int::UInt;
use ruma_api::ruma_api; use ruma_api::ruma_api;
use ruma_common::presence::PresenceState;
use ruma_events::{ use ruma_events::{
presence::PresenceEvent, AnyBasicEvent, AnyEphemeralRoomEvent, AnyRoomEventStub, presence::PresenceEvent, AnyBasicEvent, AnyEphemeralRoomEvent, AnyRoomEventStub,
AnyStateEventStub, AnyStrippedStateEventStub, AnyToDeviceEvent, EventJson, AnyStateEventStub, AnyStrippedStateEventStub, AnyToDeviceEvent, EventJson,
@ -92,10 +93,8 @@ ruma_api! {
error: crate::Error error: crate::Error
} }
pub use ruma_common::presence::PresenceState; #[deprecated = "use `presence::PresenceState` from `ruma` or `ruma-common` instead"]
pub use ruma_common::presence::PresenceState as SetPresence;
#[deprecated = "use `PresenceState` instead"]
pub use self::PresenceState as SetPresence;
/// A filter represented either as its full JSON definition or the ID of a saved filter. /// A filter represented either as its full JSON definition or the ID of a saved filter.
#[derive(Clone, Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]

View File

@ -15,6 +15,10 @@ Improvements:
* Add `room::MessageFormat` and `room::FormattedBody` * Add `room::MessageFormat` and `room::FormattedBody`
Deprecations:
* `presence::PresenceState` has been moved. Import it from `ruma` or `ruma-common`.
# 0.21.3 # 0.21.3
Bug fixes: Bug fixes:

View File

@ -3,11 +3,13 @@
//! The only content valid for this event is `PresenceEventContent. //! The only content valid for this event is `PresenceEventContent.
use js_int::UInt; use js_int::UInt;
pub use ruma_common::presence::PresenceState;
use ruma_events_macros::{Event, EventContent}; use ruma_events_macros::{Event, EventContent};
use ruma_identifiers::UserId; use ruma_identifiers::UserId;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[deprecated = "use `presence::PresenceState` from `ruma` or `ruma-common` instead"]
pub use ruma_common::presence::PresenceState;
/// Presence event. /// Presence event.
#[derive(Clone, Debug, Event)] #[derive(Clone, Debug, Event)]
pub struct PresenceEvent { pub struct PresenceEvent {