events: Fix missing condition in Unsigned::is_empty under unstable-pre-spec

This commit is contained in:
Jonas Platte 2022-02-02 20:09:28 +01:00
parent cbd4457f64
commit c5550bdbc8
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67

View File

@ -41,7 +41,15 @@ impl Unsigned {
/// events. Do not use it to determine whether an incoming `unsigned` field was present - it /// events. Do not use it to determine whether an incoming `unsigned` field was present - it
/// could still have been present but contained none of the known fields. /// could still have been present but contained none of the known fields.
pub fn is_empty(&self) -> bool { pub fn is_empty(&self) -> bool {
self.age.is_none() && self.transaction_id.is_none() #[cfg(not(feature = "unstable-pre-spec"))]
{
self.age.is_none() && self.transaction_id.is_none()
}
#[cfg(feature = "unstable-pre-spec")]
{
self.age.is_none() && self.transaction_id.is_none() && self.relations.is_none()
}
} }
} }