fix connector limit when equal to 0

fixes #2514
This commit is contained in:
Rob Ede 2022-03-08 02:07:52 +00:00
parent 9b1db1b950
commit f74ce86769
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
1 changed files with 6 additions and 1 deletions

View File

@ -246,7 +246,12 @@ where
/// ///
/// The default limit size is 100. /// The default limit size is 100.
pub fn limit(mut self, limit: usize) -> Self { pub fn limit(mut self, limit: usize) -> Self {
if limit == 0 {
self.config.limit = u32::MAX as usize;
} else {
self.config.limit = limit; self.config.limit = limit;
}
self self
} }