Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/core/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ impl BlockHash {
Ok(BlockHash { inner })
}
}

pub fn as_ref(&self) -> BlockHashRef<'_> {
unsafe { BlockHashRef::from_ptr(self.inner as *const _) }
}
}

impl AsPtr<btck_BlockHash> for BlockHash {
Expand Down Expand Up @@ -272,12 +276,6 @@ impl Block {
}
}

impl BlockHash {
pub fn as_ref(&self) -> BlockHashRef<'_> {
unsafe { BlockHashRef::from_ptr(self.inner as *const _) }
}
}

impl AsPtr<btck_Block> for Block {
fn as_ptr(&self) -> *const btck_Block {
self.inner as *const _
Expand Down
Loading