From c81608c6d2e243eee07261fe124216e13e8d7877 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Wed, 8 Jun 2022 14:35:11 +0000 Subject: [PATCH] Fix a couple of weak warnings found by rust-analyzer itself --- crates/ide-assists/src/handlers/inline_type_alias.rs | 9 ++------- crates/rust-analyzer/tests/slow-tests/support.rs | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/crates/ide-assists/src/handlers/inline_type_alias.rs b/crates/ide-assists/src/handlers/inline_type_alias.rs index bc4a07358c..d4d840f223 100644 --- a/crates/ide-assists/src/handlers/inline_type_alias.rs +++ b/crates/ide-assists/src/handlers/inline_type_alias.rs @@ -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::{ diff --git a/crates/rust-analyzer/tests/slow-tests/support.rs b/crates/rust-analyzer/tests/slow-tests/support.rs index 36bffe3210..2415abc1d8 100644 --- a/crates/rust-analyzer/tests/slow-tests/support.rs +++ b/crates/rust-analyzer/tests/slow-tests/support.rs @@ -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