summaryrefslogtreecommitdiffstats
path: root/src/usecase
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-22 10:36:24 +0000
committeraur-build <aur-build@localhost>2026-11-22 10:36:24 +0000
commit3dc71b2f5160ef9bd46143eed0edb5d2557b58e6 (patch)
tree7cc7169181b4bdd73fd8817f8c1d7cce6e6998a8 /src/usecase
parent9dc9087d89891c6e5ef7e5dc084dd13c8611843e (diff)
downloadaur-build-3dc71b2f5160ef9bd46143eed0edb5d2557b58e6.tar.gz
aur-build-3dc71b2f5160ef9bd46143eed0edb5d2557b58e6.zip
rustfmt,lints: pin the formatting, adopt the idiom lints, pay them off
rustfmt.toml fixes the shape the tree is written in (120 columns, small items kept on one line) and one canonical pass makes it the truth. [lints.clippy] names the idiom lints worth enforcing and leaves out the two that would add doc-comment boilerplate rather than remove it. The tree pays them off here: write!/writeln! instead of push_str(&format!()), let-else instead of match-on-Option, borrows where a thread entry point only reads what it owns, no `&self` on a Copy state and no `self` nobody reads. ops::to_prometheus gains one gauge helper: a metric's HELP, TYPE and value are now emitted by the same call instead of three.
Diffstat (limited to 'src/usecase')
-rw-r--r--src/usecase/builds.rs10
-rw-r--r--src/usecase/mod.rs7
2 files changed, 3 insertions, 14 deletions
diff --git a/src/usecase/builds.rs b/src/usecase/builds.rs
index c947742..265e6cb 100644
--- a/src/usecase/builds.rs
+++ b/src/usecase/builds.rs
@@ -29,15 +29,7 @@ pub fn cancel(db: &Db, build_id: &str) -> Result<()> {
/// what the audit trail is there to rule out.
pub fn retry(db: &Db, actor: &str, build_id: &str) -> Result<()> {
builds::retry(db, build_id)?;
- db::audit(
- &db.writer,
- actor,
- actor,
- "build.retry",
- "build",
- build_id,
- serde_json::json!({}),
- )
+ db::audit(&db.writer, actor, actor, "build.retry", "build", build_id, serde_json::json!({}))
}
/// Take a package out of the repository index.
diff --git a/src/usecase/mod.rs b/src/usecase/mod.rs
index 4a7a0a9..288d71d 100644
--- a/src/usecase/mod.rs
+++ b/src/usecase/mod.rs
@@ -26,10 +26,7 @@ mod subscriptions;
pub use bootstrap::{init, open, serve};
pub use builds::{cancel, enqueue_candidate, manual_rebuild, retry, withdraw_package};
+pub use detect::{check, detect, Checked};
pub use maintenance::{acknowledge_notice, backup, plan_gc, run_gc, GcPlan};
-pub use reviews::{
- approve, bulk, prepare_review, reject, view_review, Approval, Approved, Decision,
- Prepared,
-};
+pub use reviews::{approve, bulk, prepare_review, reject, view_review, Approval, Approved, Decision, Prepared};
pub use subscriptions::{subscribe, toggle_pause, unsubscribe, Pause, Subscribe};
-pub use detect::{check, detect, Checked};