computer: lazy part 3

This commit is contained in:
nym21
2025-05-03 11:44:33 +02:00
parent ae0e092935
commit efa7294f59
79 changed files with 707 additions and 311 deletions
+2 -10
View File
@@ -19,11 +19,7 @@ pub use traits::*;
use variants::*;
#[derive(Debug, Clone)]
pub enum StoredVec<I, T>
where
I: StoredIndex,
T: StoredType,
{
pub enum StoredVec<I, T> {
Raw(RawVec<I, T>),
Compressed(CompressedVec<I, T>),
}
@@ -209,11 +205,7 @@ where
}
#[derive(Debug)]
pub enum StoredVecIterator<'a, I, T>
where
I: StoredIndex,
T: StoredType,
{
pub enum StoredVecIterator<'a, I, T> {
Raw(RawVecIterator<'a, I, T>),
Compressed(CompressedVecIterator<'a, I, T>),
}
@@ -1,4 +1,4 @@
use zerocopy::{FromBytes, Immutable, IntoBytes, KnownLayout};
use zerocopy_derive::{FromBytes, Immutable, IntoBytes, KnownLayout};
#[derive(Debug, Clone, IntoBytes, Immutable, FromBytes, KnownLayout)]
pub struct CompressedPageMetadata {
+2 -1
View File
@@ -5,7 +5,8 @@ use std::{
path::Path,
};
use zerocopy::{FromBytes, Immutable, IntoBytes, KnownLayout};
use zerocopy::{FromBytes, IntoBytes};
use zerocopy_derive::{FromBytes, Immutable, IntoBytes, KnownLayout};
use crate::{Error, Result};
+2 -1
View File
@@ -5,7 +5,8 @@ use std::{
path::Path,
};
use zerocopy::{FromBytes, Immutable, IntoBytes, KnownLayout};
use zerocopy::{FromBytes, IntoBytes};
use zerocopy_derive::{FromBytes, Immutable, IntoBytes, KnownLayout};
use crate::{Error, Result};
+1 -5
View File
@@ -359,11 +359,7 @@ where
}
}
impl<I, T> Clone for CompressedVec<I, T>
where
I: StoredIndex,
T: StoredType,
{
impl<I, T> Clone for CompressedVec<I, T> {
fn clone(&self) -> Self {
Self {
inner: self.inner.clone(),
+1 -5
View File
@@ -194,11 +194,7 @@ where
}
}
impl<I, T> Clone for RawVec<I, T>
where
I: StoredIndex,
T: StoredType,
{
impl<I, T> Clone for RawVec<I, T> {
fn clone(&self) -> Self {
Self {
version: self.version,