From 95d67ec40174ec1c344ab39eee414d7a41a36af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Mon, 29 Jun 2020 18:07:52 +0300 Subject: Use more of FxHash* --- crates/ra_assists/src/handlers/reorder_fields.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_assists/src/handlers') diff --git a/crates/ra_assists/src/handlers/reorder_fields.rs b/crates/ra_assists/src/handlers/reorder_fields.rs index 897da2832..bc58ce5fe 100644 --- a/crates/ra_assists/src/handlers/reorder_fields.rs +++ b/crates/ra_assists/src/handlers/reorder_fields.rs @@ -1,7 +1,7 @@ -use std::collections::HashMap; +use itertools::Itertools; +use rustc_hash::FxHashMap; use hir::{Adt, ModuleDef, PathResolution, Semantics, Struct}; -use itertools::Itertools; use ra_ide_db::RootDatabase; use ra_syntax::{algo, ast, match_ast, AstNode, SyntaxKind, SyntaxKind::*, SyntaxNode}; @@ -87,7 +87,7 @@ fn struct_definition(path: &ast::Path, sema: &Semantics) -> Option } } -fn compute_fields_ranks(path: &ast::Path, ctx: &AssistContext) -> Option> { +fn compute_fields_ranks(path: &ast::Path, ctx: &AssistContext) -> Option> { Some( struct_definition(path, &ctx.sema)? .fields(ctx.db) -- cgit v1.2.3