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 itertools::Itertools;
use std::collections::HashMap; use std::collections::HashMap;
use syntax::{ use syntax::{
ast::{ ast::{self, make, HasGenericParams, HasName},
self, ted, AstNode, NodeOrToken, SyntaxNode,
make::{self},
HasGenericParams, HasName,
},
ted::{self},
AstNode, NodeOrToken, SyntaxNode,
}; };
use crate::{ 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 l = sorted_values(l);
let r = sorted_values(r); 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, (Value::Null, Value::Null) => None,
// magic string literal "{...}" acts as wildcard for any sub-JSON // magic string literal "{...}" acts as wildcard for any sub-JSON