v0.3.1-pre.006-fix.001

This commit is contained in:
2026-08-29 09:12:38 +02:00
parent b76baf6835
commit c43d4d7c38
4 changed files with 101 additions and 6 deletions

View File

@@ -142,10 +142,10 @@ pub struct RawSlotRange {
impl RawSlotRange {
/// Creates one optional inclusive slot range and rejects reversed bounds.
pub fn new(start_inclusive: std::option::Option<u64>, end_inclusive: std::option::Option<u64>) -> crate::Result<Self> {
if let (std::option::Option::Some(start), std::option::Option::Some(end)) = (start_inclusive, end_inclusive) {
if start > end {
return std::result::Result::Err(raw_query_error("slot_range"));
}
if let (std::option::Option::Some(start), std::option::Option::Some(end)) = (start_inclusive, end_inclusive)
&& start > end
{
return std::result::Result::Err(raw_query_error("slot_range"));
}
return std::result::Result::Ok(Self { end_inclusive, start_inclusive });
}