computer: part 5

This commit is contained in:
nym21
2025-04-06 12:01:45 +02:00
parent 810cdbd790
commit 1639df5616
21 changed files with 602 additions and 179 deletions

View File

@@ -20,7 +20,7 @@ pub enum Error {
ExpectVecToHaveIndex,
FailedKeyTryIntoUsize,
UnsupportedUnflushedState,
RangeFromAfterTo,
RangeFromAfterTo(usize, usize),
DifferentCompressionMode,
}
@@ -66,7 +66,7 @@ impl fmt::Display for Error {
)
}
Error::ZeroCopyError => write!(f, "Zero copy convert error"),
Error::RangeFromAfterTo => write!(f, "Range, from is after to"),
Error::RangeFromAfterTo(from, to) => write!(f, "Range, from {from} is after to {to}"),
Error::DifferentCompressionMode => write!(f, "Different compression mode chosen"),
}
}

View File

@@ -224,7 +224,7 @@ where
});
if from > to {
return Err(Error::RangeFromAfterTo);
return Err(Error::RangeFromAfterTo(from, to));
}
let mut page: Option<(usize, Values<T>)> = None;