docs: Fix warnings

This commit is contained in:
Kévin Commaille 2022-04-10 11:17:12 +02:00
parent a1a8a01bec
commit 65cb085f30
No known key found for this signature in database
GPG Key ID: DD507DAE96E8245C
2 changed files with 6 additions and 4 deletions

View File

@ -13,6 +13,8 @@ use super::{
/// The base trait that all event content types implement. /// The base trait that all event content types implement.
/// ///
/// Use [`macros::EventContent`] to derive this traits. It is not meant to be implemented manually. /// Use [`macros::EventContent`] to derive this traits. It is not meant to be implemented manually.
///
/// [`macros::EventContent`]: super::macros::EventContent
pub trait EventContent: Sized + Serialize { pub trait EventContent: Sized + Serialize {
/// The Rust enum for the event kind's known types. /// The Rust enum for the event kind's known types.
type EventType; type EventType;

View File

@ -53,10 +53,10 @@ pub enum MediaSource {
Encrypted(Box<EncryptedFile>), Encrypted(Box<EncryptedFile>),
} }
/// Custom implementation of `Deserialize`, because serde doesn't guarantee what variant will be // Custom implementation of `Deserialize`, because serde doesn't guarantee what variant will be
/// deserialized for "externally tagged"¹ enums where multiple "tag" fields exist. // deserialized for "externally tagged"¹ enums where multiple "tag" fields exist.
/// //
/// ¹ https://serde.rs/enum-representations.html // ¹ https://serde.rs/enum-representations.html
impl<'de> Deserialize<'de> for MediaSource { impl<'de> Deserialize<'de> for MediaSource {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where where