diff --git a/crates/ruma-serde/src/strings.rs b/crates/ruma-serde/src/strings.rs index 9482ebfe..4183f731 100644 --- a/crates/ruma-serde/src/strings.rs +++ b/crates/ruma-serde/src/strings.rs @@ -15,7 +15,7 @@ use serde::{ /// formulation in the spec. /// /// To be used like this: -/// `#[serde(deserialize_with = "empty_string_as_none")]` +/// `#[serde(default, deserialize_with = "empty_string_as_none")]` /// Relevant serde issue: pub fn empty_string_as_none<'de, D, T>(de: D) -> Result, D::Error> where