Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
codabrink committed Jan 10, 2025
1 parent ad3896d commit 1047871
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xmtp_mls/src/storage/encrypted_store/consent_record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ impl DbConnection {
let changed = self.raw_query(|conn| -> diesel::QueryResult<_> {
let existing: Vec<StoredConsentRecord> = query.load(conn)?;
let changed: Vec<_> = records
.to_vec()
.into_iter()
.iter()
.cloned()
.filter(|r| !existing.contains(r))
.collect();

conn.transaction::<_, diesel::result::Error, _>(|conn| {
for record in records.into_iter() {
for record in records.iter() {
diesel::insert_into(dsl::consent_records)
.values(record)
.on_conflict((dsl::entity_type, dsl::entity))
Expand Down

0 comments on commit 1047871

Please sign in to comment.