v0.3.1-pre.006-fix.001
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user