Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhuaaa committed Aug 6, 2024
1 parent f60351b commit f08e736
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions xmtp_mls/src/identity_updates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,8 @@ where
.get_association_state(conn, inbox_id.as_ref(), starting_sequence_id)
.await?;

let incremental_updates = conn.get_identity_updates(
&inbox_id.as_ref(),
starting_sequence_id,
ending_sequence_id,
)?;
let incremental_updates =
conn.get_identity_updates(inbox_id.as_ref(), starting_sequence_id, ending_sequence_id)?;

let last_sequence_id = incremental_updates.last().map(|update| update.sequence_id);
if ending_sequence_id.is_some()
Expand Down
4 changes: 2 additions & 2 deletions xmtp_mls/src/storage/encrypted_store/association_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl StoredAssociationState {
}
.store_or_ignore(conn);

if !result.is_err() {
if result.is_ok() {
log::debug!(
"Wrote association state to cache: {} {}",
inbox_id,
Expand Down Expand Up @@ -78,7 +78,7 @@ impl StoredAssociationState {
})
.transpose();

if !result.is_err() && result.as_ref().unwrap().is_some() {
if result.is_ok() && result.as_ref().unwrap().is_some() {
log::debug!(
"Loaded association state from cache: {} {}",
inbox_id,
Expand Down

0 comments on commit f08e736

Please sign in to comment.