Skip to content

Commit

Permalink
switch to NoteKey in more places
Browse files Browse the repository at this point in the history
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Feb 8, 2024
1 parent 8de35b0 commit 1ebdd41
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/ndb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,14 @@ impl Ndb {
Ok(res)
}

pub fn get_blocks_by_key<'a>(&self, txn: &'a Transaction, note_key: u64) -> Result<Blocks<'a>> {
let blocks_ptr =
unsafe { bindings::ndb_get_blocks_by_key(self.as_ptr(), txn.as_mut_ptr(), note_key) };
pub fn get_blocks_by_key<'a>(
&self,
txn: &'a Transaction,
note_key: NoteKey,
) -> Result<Blocks<'a>> {
let blocks_ptr = unsafe {
bindings::ndb_get_blocks_by_key(self.as_ptr(), txn.as_mut_ptr(), note_key.as_u64())
};

if blocks_ptr.is_null() {
return Err(Error::NotFound);
Expand Down

0 comments on commit 1ebdd41

Please sign in to comment.