diff --git a/crates/ruma-events/src/lib.rs b/crates/ruma-events/src/lib.rs index c00737ae..097ab965 100644 --- a/crates/ruma-events/src/lib.rs +++ b/crates/ruma-events/src/lib.rs @@ -407,12 +407,11 @@ where #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct PrivOwnedStr(Box); -/// Helper function for erroring when trying to serialize an event enum _Custom -/// variant that can only be created by deserializing from an unknown event -/// type. +/// Helper function for erroring when trying to serialize an event enum _Custom variant that can +/// only be created by deserializing from an unknown event type. #[doc(hidden)] #[allow(clippy::ptr_arg)] -fn serialize_custom_event_error(_: &String, _: S) -> Result { +pub fn serialize_custom_event_error(_: &String, _: S) -> Result { Err(serde::ser::Error::custom( "Failed to serialize event [content] enum: Unknown event type.\n\ To send custom events, turn them into `Raw` by going through