treewide: format with nightly rustfmt; auto-fix Clippy lints

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: If4fd0511087dbaa65afc56a34d7c2f166a6a6964
This commit is contained in:
raf 2026-02-08 21:18:42 +03:00
commit 3a03cf7b3e
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
26 changed files with 222 additions and 161 deletions

View file

@ -77,13 +77,13 @@ pub enum JobsetState {
impl JobsetState {
/// Returns true if this jobset state allows evaluation.
#[must_use]
#[must_use]
pub const fn is_evaluable(&self) -> bool {
matches!(self, Self::Enabled | Self::OneShot | Self::OneAtATime)
}
/// Returns the database string representation of this state.
#[must_use]
#[must_use]
pub const fn as_str(&self) -> &'static str {
match self {
Self::Disabled => "disabled",
@ -339,12 +339,12 @@ pub struct PaginationParams {
}
impl PaginationParams {
#[must_use]
#[must_use]
pub fn limit(&self) -> i64 {
self.limit.unwrap_or(50).clamp(1, 200)
}
#[must_use]
#[must_use]
pub fn offset(&self) -> i64 {
self.offset.unwrap_or(0).max(0)
}