style: clear clippy warnings from the stealth/adaptive work

- snapshot: make collect_fingerprints private (TreeNode is private, so a
  pub(super) fn leaked a more-private type)
- adaptive: if-let instead of single-arm match in attr_score
- stealth: move timezone test module to end of file (items-after-test-module)

No behavior change. Pre-release cleanup.
This commit is contained in:
leeguooooo
2026-06-04 14:26:08 +09:00
parent 8b55c553e6
commit fc2621559b
3 changed files with 47 additions and 49 deletions
+6 -8
View File
@@ -152,15 +152,13 @@ fn attr_score(base: &BTreeMap<String, String>, cand: &BTreeMap<String, String>)
for name in names {
let w = attr_weight(name);
total += w;
match (base.get(name), cand.get(name)) {
(Some(a), Some(b)) => {
if name == "class" {
got += w * token_jaccard(a, b);
} else if a == b {
got += w;
}
// present on only one side → no credit
if let (Some(a), Some(b)) = (base.get(name), cand.get(name)) {
if name == "class" {
got += w * token_jaccard(a, b);
} else if a == b {
got += w;
}
_ => {} // present on only one side → no credit
}
}
if total == 0.0 {