Skip to content

Commit

Permalink
fix: don't duplicate save_contact
Browse files Browse the repository at this point in the history
  • Loading branch information
nanu-c committed Dec 27, 2023
1 parent 9521e7b commit ca8a9af
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
8 changes: 1 addition & 7 deletions presage-store-sled/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use presage::libsignal_service::{
session_store::SessionStoreExt,
Profile, ServiceAddress,
};
use presage::store::{ContentExt, ContentsStore, PreKeyStoreExt, StateStore, Store, Thread};
use presage::store::{ContentExt, ContentsStore, StateStore, Store, Thread};
use presage::ThreadMetadata;
use presage::{manager::RegistrationData, proto::verified};
use presage_store_cipher::StoreCipher;
Expand Down Expand Up @@ -448,12 +448,6 @@ impl ContentsStore for SledStore {
Ok(())
}

fn save_contact(&mut self, contact: Contact) -> Result<(), Self::ContentsStoreError> {
self.insert(SLED_TREE_CONTACTS, contact.uuid, contact)?;
debug!("saved contact");
Ok(())
}

fn contacts(&self) -> Result<Self::ContactsIter, SledStoreError> {
Ok(SledContactsIter {
iter: self.read().open_tree(SLED_TREE_CONTACTS)?.iter(),
Expand Down
3 changes: 0 additions & 3 deletions presage/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,6 @@ pub trait ContentsStore {
/// Save a contact
fn save_contact(&mut self, contacts: &Contact) -> Result<(), Self::ContentsStoreError>;

/// Save a single contact
fn save_contact(&mut self, contact: Contact) -> Result<(), Self::ContentsStoreError>;

/// Get an iterator on all stored (synchronized) contacts
fn contacts(&self) -> Result<Self::ContactsIter, Self::ContentsStoreError>;

Expand Down

0 comments on commit ca8a9af

Please sign in to comment.