various: eliminate redundant disk check; improve error handling

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I1f37cc60380790bc1bf11f143194ad116a6a6964
This commit is contained in:
raf 2026-02-05 22:48:02 +03:00
commit 1c18306822
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
5 changed files with 39 additions and 23 deletions

View file

@ -294,7 +294,7 @@ pub struct PaginationParams {
impl PaginationParams {
pub fn limit(&self) -> i64 {
self.limit.unwrap_or(50).min(200).max(1)
self.limit.unwrap_or(50).clamp(1, 200)
}
pub fn offset(&self) -> i64 {