Skip to content

Commit

Permalink
Use better Bound::inclusive_int constructor for naked int
Browse files Browse the repository at this point in the history
  • Loading branch information
ueco-jb committed Dec 1, 2021
1 parent 237ddee commit 0862505
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/storage-plus/src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ mod test {
let all: StdResult<Vec<_>> = PEOPLE_ID
.range_de(
&store,
Some(Bound::Inclusive(56u32.to_be_bytes().to_vec())),
Some(Bound::inclusive_int(56u32)),
None,
Order::Ascending,
)
Expand All @@ -568,7 +568,7 @@ mod test {
let all: StdResult<Vec<_>> = PEOPLE_ID
.range_de(
&store,
Some(Bound::Inclusive(57u32.to_be_bytes().to_vec())),
Some(Bound::inclusive_int(57u32)),
None,
Order::Ascending,
)
Expand Down
2 changes: 1 addition & 1 deletion packages/storage-plus/src/snapshot/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ where

// this will look for the first snapshot of height >= given height
// If None, there is no snapshot since that time.
let start = Bound::inclusive(height.to_be_bytes().to_vec());
let start = Bound::inclusive_int(height);
let first = self
.changelog
.prefix(key)
Expand Down

0 comments on commit 0862505

Please sign in to comment.