mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-24 00:25:34 -04:00
Fix more new clippy lints
This commit is contained in:
committed by
Andy Balaam
parent
e4aff871de
commit
ebbf34e924
@@ -406,15 +406,13 @@ impl EventCacheStore for IndexeddbEventCacheStore {
|
||||
)?;
|
||||
if let Some(chunk) =
|
||||
transaction.get_chunk_by_id(linked_chunk_id, before_chunk_identifier).await?
|
||||
&& let Some(previous_identifier) = chunk.previous
|
||||
{
|
||||
if let Some(previous_identifier) = chunk.previous {
|
||||
let previous_identifier = ChunkIdentifier::new(previous_identifier);
|
||||
return Ok(transaction
|
||||
.load_chunk_by_id(linked_chunk_id, previous_identifier)
|
||||
.await?);
|
||||
}
|
||||
let previous_identifier = ChunkIdentifier::new(previous_identifier);
|
||||
Ok(transaction.load_chunk_by_id(linked_chunk_id, previous_identifier).await?)
|
||||
} else {
|
||||
Ok(None)
|
||||
}
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
#[instrument(skip(self))]
|
||||
|
||||
@@ -345,12 +345,12 @@ impl MediaStoreInner for IndexeddbMediaStore {
|
||||
|
||||
let transaction =
|
||||
self.transaction(&[MediaMetadata::OBJECT_STORE], TransactionMode::Readwrite)?;
|
||||
if let Some(mut metadata) = transaction.get_media_metadata_by_id(request).await? {
|
||||
if metadata.ignore_policy != ignore_policy {
|
||||
metadata.ignore_policy = ignore_policy;
|
||||
transaction.put_media_metadata(&metadata).await?;
|
||||
transaction.commit().await?;
|
||||
}
|
||||
if let Some(mut metadata) = transaction.get_media_metadata_by_id(request).await?
|
||||
&& metadata.ignore_policy != ignore_policy
|
||||
{
|
||||
metadata.ignore_policy = ignore_policy;
|
||||
transaction.put_media_metadata(&metadata).await?;
|
||||
transaction.commit().await?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user