From 3dc71b2f5160ef9bd46143eed0edb5d2557b58e6 Mon Sep 17 00:00:00 2001 From: aur-build Date: Sun, 22 Nov 2026 10:36:24 +0000 Subject: 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. --- tests/versions.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tests/versions.rs') diff --git a/tests/versions.rs b/tests/versions.rs index 175938d..a7b41f8 100644 --- a/tests/versions.rs +++ b/tests/versions.rs @@ -23,11 +23,7 @@ fn a_downgrade_in_the_aur_is_flagged_not_silently_served() { let base = base_release(&env, &c); let panels = diff::panels(&env.cfg, &env.db, &c, base.as_ref()).unwrap(); let version = panel(&panels, "version"); - assert!( - version.body.contains("DOWNGRADE"), - "the version panel must call out a downgrade: {:?}", - version.body - ); + assert!(version.body.contains("DOWNGRADE"), "the version panel must call out a downgrade: {:?}", version.body); assert!(version.body.contains("1.0-1 -> 0.9-1"), "{:?}", version.body); assert!(pkgver::is_downgrade("1.0-1", "0.9-1")); assert_eq!(aur_build::db::index_version(&env.db, "plain-make").unwrap().unwrap(), "1.0-1"); -- cgit v1.2.3