various: fix auto-fisable Clippy lints

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I79a708981b5aee43eadbd48d69fb78be6a6a6964
This commit is contained in:
raf 2026-02-08 21:35:21 +03:00
commit 0dc09dbd19
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
2 changed files with 7 additions and 7 deletions

View file

@ -220,8 +220,8 @@ pub struct DeclarativeProject {
/// Declarative notification configuration.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DeclarativeNotification {
/// Notification type: github_status, email, gitlab_status, gitea_status,
/// run_command
/// Notification type: `github_status`, email, `gitlab_status`, `gitea_status`,
/// `run_command`
pub notification_type: String,
/// Type-specific configuration (JSON object)
pub config: serde_json::Value,
@ -274,7 +274,7 @@ pub struct DeclarativeJobset {
pub flake_mode: bool,
#[serde(default = "default_check_interval")]
pub check_interval: i32,
/// Jobset state: disabled, enabled, one_shot, or one_at_a_time
/// Jobset state: disabled, enabled, `one_shot`, or `one_at_a_time`
pub state: Option<String>,
/// Git branch to track (defaults to repository default branch)
pub branch: Option<String>,

View file

@ -1035,10 +1035,10 @@ async fn queue_page(State(state): State<AppState>) -> Html<String> {
.collect();
let tmpl = QueueTemplate {
running_builds,
pending_builds,
running_count,
running_builds,
pending_count,
running_count,
};
Html(
tmpl
@ -1049,7 +1049,7 @@ async fn queue_page(State(state): State<AppState>) -> Html<String> {
fn format_elapsed(secs: i64) -> String {
if secs < 60 {
format!("{}s", secs)
format!("{secs}s")
} else if secs < 3600 {
format!("{}m {}s", secs / 60, secs % 60)
} else {
@ -1142,7 +1142,7 @@ async fn admin_page(
.map(|b| {
let current_builds = *builds_per_builder.get(&b.id).unwrap_or(&0);
let load_percent = if b.max_jobs > 0 {
(current_builds * 100) / (b.max_jobs as i64)
(current_builds * 100) / i64::from(b.max_jobs)
} else {
0
};