mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-24 06:39:58 -07:00
global: crates cleanup
This commit is contained in:
@@ -9,6 +9,7 @@ license = { workspace = true }
|
||||
brk_fetcher = { workspace = true }
|
||||
brk_indexer = { workspace = true }
|
||||
brk_parser = { workspace = true }
|
||||
byteview = { workspace = true }
|
||||
color-eyre = { workspace = true }
|
||||
derive_deref = { workspace = true }
|
||||
fjall = { workspace = true }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use brk_indexer::{Addressindex, Txoutindex};
|
||||
use fjall::Slice;
|
||||
use byteview::ByteView;
|
||||
use zerocopy::{FromBytes, Immutable, IntoBytes, KnownLayout};
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Immutable, IntoBytes, KnownLayout, FromBytes)]
|
||||
@@ -9,13 +9,13 @@ pub struct AddressindexTxoutindex {
|
||||
txoutindex: Txoutindex,
|
||||
}
|
||||
|
||||
impl TryFrom<Slice> for AddressindexTxoutindex {
|
||||
impl TryFrom<ByteView> for AddressindexTxoutindex {
|
||||
type Error = storable_vec::Error;
|
||||
fn try_from(value: Slice) -> Result<Self, Self::Error> {
|
||||
fn try_from(value: ByteView) -> Result<Self, Self::Error> {
|
||||
Ok(Self::read_from_bytes(&value)?)
|
||||
}
|
||||
}
|
||||
impl From<AddressindexTxoutindex> for Slice {
|
||||
impl From<AddressindexTxoutindex> for ByteView {
|
||||
fn from(value: AddressindexTxoutindex) -> Self {
|
||||
Self::new(value.as_bytes())
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
use fjall::Slice;
|
||||
use byteview::ByteView;
|
||||
|
||||
pub struct Unit();
|
||||
impl From<Slice> for Unit {
|
||||
fn from(_: Slice) -> Self {
|
||||
impl From<ByteView> for Unit {
|
||||
fn from(_: ByteView) -> Self {
|
||||
Self()
|
||||
}
|
||||
}
|
||||
impl From<Unit> for Slice {
|
||||
impl From<Unit> for ByteView {
|
||||
fn from(_: Unit) -> Self {
|
||||
Self::new(&[])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user