state-res: Stabilize deserializing stringified integers for PLs

Removes the `compat` feature.
This commit is contained in:
Kévin Commaille 2022-06-24 11:25:19 +02:00 committed by Kévin Commaille
parent ca3ca023a4
commit da462adab1
4 changed files with 6 additions and 11 deletions

View File

@ -11,6 +11,8 @@ Improvements:
* Add `m.federate` to `auth_check`:
<https://github.com/matrix-org/matrix-spec/pull/1103>
* Add `RoomVersion::V10` (MSC3604)
* Deserialize stringified integers for power levels without the `compat` feature
* Removes the `compat` feature
# 0.7.0

View File

@ -15,7 +15,6 @@ rust-version = "1.60"
all-features = true
[features]
compat = []
unstable-exhaustive-types = []
[dependencies]

View File

@ -337,18 +337,13 @@ where
#[derive(Deserialize)]
struct PowerLevelsContentFields {
#[cfg_attr(
feature = "compat",
serde(deserialize_with = "ruma_common::serde::btreemap_deserialize_v1_powerlevel_values")
#[serde(
default,
deserialize_with = "ruma_common::serde::btreemap_deserialize_v1_powerlevel_values"
)]
#[serde(default)]
users: BTreeMap<OwnedUserId, Int>,
#[cfg_attr(
feature = "compat",
serde(deserialize_with = "ruma_common::serde::deserialize_v1_powerlevel")
)]
#[serde(default)]
#[serde(default, deserialize_with = "ruma_common::serde::deserialize_v1_powerlevel")]
users_default: Int,
}

View File

@ -88,7 +88,6 @@ compat = [
"ruma-common/compat",
"ruma-client-api?/compat",
"ruma-federation-api?/compat",
"ruma-state-res?/compat",
]
# Specific compatibility for past ring public/private key documents.