chore: Fix new clippy warnings

This commit is contained in:
Kévin Commaille 2022-10-09 14:13:27 +02:00 committed by Kévin Commaille
parent 68eecf71af
commit 2bdbf49535
3 changed files with 3 additions and 3 deletions

View File

@ -133,7 +133,7 @@ impl ImageMessageEventContent {
#[cfg(feature = "unstable-msc3552")]
file: Some(FileContent::encrypted(file.url.clone(), (&file).into(), None)),
#[cfg(feature = "unstable-msc3552")]
image: Some(Box::new(ImageContent::default())),
image: Some(Box::default()),
#[cfg(feature = "unstable-msc3552")]
thumbnail: None,
#[cfg(feature = "unstable-msc3552")]

View File

@ -139,7 +139,7 @@ impl VideoMessageEventContent {
#[cfg(feature = "unstable-msc3553")]
file: Some(FileContent::encrypted(file.url.clone(), (&file).into(), None)),
#[cfg(feature = "unstable-msc3553")]
video: Some(Box::new(VideoContent::default())),
video: Some(Box::default()),
#[cfg(feature = "unstable-msc3553")]
thumbnail: None,
#[cfg(feature = "unstable-msc3553")]

View File

@ -91,7 +91,7 @@ impl UserId {
/// Returns the user's localpart.
pub fn localpart(&self) -> &str {
&self.as_str()[1..self.colon_idx() as usize]
&self.as_str()[1..self.colon_idx()]
}
/// Returns the server name of the user ID.