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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user