Skip to content

Commit 1d2a456

Browse files
committed
Fix: Skip(0) is invalid
1 parent 2e67185 commit 1d2a456

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/rest.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ impl FromStr for AddressPaginator {
618618
.or_else(|| {
619619
s.parse::<usize>()
620620
.ok()
621+
.filter(|&skip| skip != 0) // Don't allow 0 for Skip
621622
.and_then(|skip| Some(Self::Skip(skip)))
622623
})
623624
.ok_or("Invalid AddressPaginator".to_string())

0 commit comments

Comments
 (0)