Fix key algorithm serde (de)serialization
This commit is contained in:
parent
f7ac4e2080
commit
67154e2c31
@ -9,7 +9,7 @@ use strum::{AsRefStr, Display, EnumString};
|
|||||||
|
|
||||||
/// The basic key algorithms in the specification.
|
/// The basic key algorithms in the specification.
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, AsRefStr, Display, EnumString)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, AsRefStr, Display, EnumString)]
|
||||||
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
|
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize), serde(rename_all = "snake_case"))]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
#[strum(serialize_all = "snake_case")]
|
#[strum(serialize_all = "snake_case")]
|
||||||
pub enum DeviceKeyAlgorithm {
|
pub enum DeviceKeyAlgorithm {
|
||||||
@ -41,7 +41,7 @@ impl TryFrom<String> for DeviceKeyAlgorithm {
|
|||||||
|
|
||||||
/// The server key algorithms defined in the Matrix spec.
|
/// The server key algorithms defined in the Matrix spec.
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, AsRefStr, Display, EnumString)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, AsRefStr, Display, EnumString)]
|
||||||
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
|
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize), serde(rename_all = "snake_case"))]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
#[strum(serialize_all = "snake_case")]
|
#[strum(serialize_all = "snake_case")]
|
||||||
pub enum ServerKeyAlgorithm {
|
pub enum ServerKeyAlgorithm {
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* Fix key algorithm serde (de)serialization
|
||||||
|
|
||||||
Breaking changes:
|
Breaking changes:
|
||||||
|
|
||||||
* Update strum dependency to 0.19
|
* Update strum dependency to 0.19
|
||||||
|
Loading…
x
Reference in New Issue
Block a user