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/vcs.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'tests/vcs.rs') diff --git a/tests/vcs.rs b/tests/vcs.rs index 52f4372..d0f0d60 100644 --- a/tests/vcs.rs +++ b/tests/vcs.rs @@ -47,10 +47,7 @@ fn stage_a_respects_a_tag_pin() { fx.upstream_commit("upstream: moved past the tag\n"); let (outcome, _) = detect_and_take(&env, "git-tagged"); - assert!( - matches!(outcome, detect::Outcome::NoChange), - "a tag pin does not drift with the branch: {outcome:?}" - ); + assert!(matches!(outcome, detect::Outcome::NoChange), "a tag pin does not drift with the branch: {outcome:?}"); } #[test] @@ -193,10 +190,7 @@ fn a_moved_tip_with_an_unchanged_pkgver_is_a_notice_not_a_candidate() { assert_eq!(notices[0].kind, notice_kind::PIN_DRIFT); let detail = notices[0].detail_json.clone(); assert!(detail.contains("nothing publishable"), "{detail}"); - assert_eq!( - env.query_i64("SELECT count(*) FROM package WHERE state='in_index'", &[]), - Some(1) - ); + assert_eq!(env.query_i64("SELECT count(*) FROM package WHERE state='in_index'", &[]), Some(1)); } #[test] -- cgit v1.2.3