Fix a couple of weak warnings found by rust-analyzer itself

This commit is contained in:
bjorn3 2022-06-08 14:35:11 +00:00
parent 66a842124b
commit c81608c6d2
2 changed files with 3 additions and 8 deletions

View file

@ -7,13 +7,8 @@ use hir::{HasSource, PathResolution};
use itertools::Itertools;
use std::collections::HashMap;
use syntax::{
ast::{
self,
make::{self},
HasGenericParams, HasName,
},
ted::{self},
AstNode, NodeOrToken, SyntaxNode,
ast::{self, make, HasGenericParams, HasName},
ted, AstNode, NodeOrToken, SyntaxNode,
};
use crate::{

View file

@ -360,7 +360,7 @@ fn find_mismatch<'a>(expected: &'a Value, actual: &'a Value) -> Option<(&'a Valu
let l = sorted_values(l);
let r = sorted_values(r);
l.into_iter().zip(r).filter_map(|(l, r)| find_mismatch(l, r)).next()
l.into_iter().zip(r).find_map(|(l, r)| find_mismatch(l, r))
}
(Value::Null, Value::Null) => None,
// magic string literal "{...}" acts as wildcard for any sub-JSON