mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-06 15:04:11 -04:00
fix(sdk): Simplify code in room::Joined::send_attachment
This commit is contained in:
@@ -667,13 +667,9 @@ impl Joined {
|
||||
info: Some(thumbnail_info),
|
||||
})
|
||||
}
|
||||
Err(error)
|
||||
if matches!(
|
||||
error,
|
||||
ImageError::ThumbnailBiggerThanOriginal
|
||||
| ImageError::FormatNotSupported
|
||||
) =>
|
||||
{
|
||||
Err(
|
||||
ImageError::ThumbnailBiggerThanOriginal | ImageError::FormatNotSupported,
|
||||
) => {
|
||||
reader.rewind()?;
|
||||
None
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user