11//! Fully type-check project and print various stats, like the number of type
22//! errors.
33
4- use std:: { collections:: HashSet , path:: Path , time:: Instant } ;
4+ use std:: { path:: Path , time:: Instant } ;
5+
6+ use itertools:: Itertools ;
7+ use rand:: { seq:: SliceRandom , thread_rng} ;
8+ use rustc_hash:: FxHashSet ;
59
610use hir:: {
711 db:: { AstDatabase , DefDatabase , HirDatabase } ,
812 original_range, AssocItem , Crate , HasSource , HirDisplay , ModuleDef ,
913} ;
1014use hir_def:: FunctionId ;
1115use hir_ty:: { Ty , TypeWalk } ;
12- use itertools:: Itertools ;
1316use ra_db:: SourceDatabaseExt ;
1417use ra_syntax:: AstNode ;
15- use rand:: { seq:: SliceRandom , thread_rng} ;
1618use stdx:: format_to;
1719
1820use crate :: cli:: { load_cargo:: load_cargo, progress_report:: ProgressReport , Result , Verbosity } ;
@@ -33,7 +35,7 @@ pub fn analysis_stats(
3335 println ! ( "Database loaded {:?}" , db_load_time. elapsed( ) ) ;
3436 let analysis_time = Instant :: now ( ) ;
3537 let mut num_crates = 0 ;
36- let mut visited_modules = HashSet :: new ( ) ;
38+ let mut visited_modules = FxHashSet :: default ( ) ;
3739 let mut visit_queue = Vec :: new ( ) ;
3840
3941 let mut krates = Crate :: all ( db) ;
0 commit comments