mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-15 06:33:58 +00:00
Fix a couple of weak warnings found by rust-analyzer itself
This commit is contained in:
parent
66a842124b
commit
c81608c6d2
2 changed files with 3 additions and 8 deletions
|
@ -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::{
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue