Fix compile errors and get serialization unit test passing
This commit is contained in:
parent
984e366c32
commit
7bc8eb4f3d
6 changed files with 70 additions and 46 deletions
|
@ -19,6 +19,11 @@ impl Locator {
|
|||
Self(smallvec![u64::MAX])
|
||||
}
|
||||
|
||||
pub fn from_index(ix: usize, count: usize) -> Self {
|
||||
let id = ((ix as u128 * u64::MAX as u128) / count as u128) as u64;
|
||||
Self(smallvec![id])
|
||||
}
|
||||
|
||||
pub fn assign(&mut self, other: &Self) {
|
||||
self.0.resize(other.0.len(), 0);
|
||||
self.0.copy_from_slice(&other.0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue