summaryrefslogtreecommitdiffstats
path: root/src/watch/staleness.rs
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/watch/staleness.rs
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/watch/staleness.rs')
-rw-r--r--src/watch/staleness.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/watch/staleness.rs b/src/watch/staleness.rs
index 94813eb..6b83032 100644
--- a/src/watch/staleness.rs
+++ b/src/watch/staleness.rs
@@ -12,7 +12,7 @@ pub enum Kind {
/// only way to reach it, and the alias is what carries the
/// feature-conditional visibility.
mod stale {
- use super::*;
+ use super::Kind;
#[derive(Debug, Clone)]
pub struct Stale {
@@ -97,9 +97,7 @@ pub fn dependents_of(db: &Db, name: &str) -> Result<Vec<String>> {
continue;
}
let depends = match serde_json::from_str::<crate::db::model::Recipe>(&json) {
- Ok(r) => crate::pkgver::dep_names(&r.depends)
- .into_iter()
- .any(|d| d == name),
+ Ok(r) => crate::pkgver::dep_names(&r.depends).into_iter().any(|d| d == name),
Err(_) => true,
};
if depends {