update servicepoint library
This commit is contained in:
parent
44ef4bb6d7
commit
f7cb5546b3
8 changed files with 116 additions and 141 deletions
|
@ -2,11 +2,11 @@ use std::sync::{Arc, RwLock};
|
|||
|
||||
#[derive(uniffi::Object)]
|
||||
pub struct BitVec {
|
||||
pub(crate) actual: RwLock<servicepoint::BitVec>,
|
||||
pub(crate) actual: RwLock<servicepoint::DisplayBitVec>,
|
||||
}
|
||||
|
||||
impl BitVec {
|
||||
fn internal_new(actual: servicepoint::BitVec) -> Arc<Self> {
|
||||
fn internal_new(actual: servicepoint::DisplayBitVec) -> Arc<Self> {
|
||||
Arc::new(Self {
|
||||
actual: RwLock::new(actual),
|
||||
})
|
||||
|
@ -17,11 +17,11 @@ impl BitVec {
|
|||
impl BitVec {
|
||||
#[uniffi::constructor]
|
||||
pub fn new(size: u64) -> Arc<Self> {
|
||||
Self::internal_new(servicepoint::BitVec::repeat(false, size as usize))
|
||||
Self::internal_new(servicepoint::DisplayBitVec::repeat(false, size as usize))
|
||||
}
|
||||
#[uniffi::constructor]
|
||||
pub fn load(data: Vec<u8>) -> Arc<Self> {
|
||||
Self::internal_new(servicepoint::BitVec::from_slice(&data))
|
||||
Self::internal_new(servicepoint::DisplayBitVec::from_slice(&data))
|
||||
}
|
||||
|
||||
#[uniffi::constructor]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue