@@ -29,8 +29,8 @@ impl PartialEq for Package {
29
29
}
30
30
impl Eq for Package { }
31
31
impl Hash for Package {
32
- fn hash < H : Hasher > ( & self , state : & mut H ) {
33
- self . name . hash ( state ) ;
32
+ fn hash < H : Hasher > ( & self , _state : & mut H ) {
33
+ blake3 :: hash ( & self . name . as_bytes ( ) ) ;
34
34
}
35
35
}
36
36
@@ -70,8 +70,7 @@ fn get_source_dirs(
70
70
if !full_recursive {
71
71
subdirs
72
72
. unwrap_or ( vec ! [ ] )
73
- // I don't think we do any io here so par_iter is probably slower than iter
74
- . iter ( )
73
+ . par_iter ( )
75
74
. map ( |subdir| get_source_dirs ( & full_path, subdir. to_owned ( ) ) )
76
75
. collect :: < Vec < AHashSet < ( String , bsconfig:: PackageSource ) > > > ( )
77
76
. into_iter ( )
@@ -81,12 +80,6 @@ fn get_source_dirs(
81
80
source_folders
82
81
}
83
82
84
- // fn add_bsconfig_package(
85
- // map: &'a mut AHashMap<String, Package>,
86
- // bsconfig: bsconfig::T,
87
- // ) -> (&'a mut AHashMap<String, Package>, Vec(String)) {
88
- // }
89
-
90
83
fn get_package_dir ( package_name : & str , is_root : bool , project_root : & str ) -> String {
91
84
if is_root {
92
85
project_root. to_owned ( )
@@ -125,7 +118,6 @@ fn build_package<'a>(
125
118
let mut source_folders: AHashSet < ( String , bsconfig:: PackageSource ) > =
126
119
AHashSet :: new ( ) ;
127
120
sources
128
- // I don't think we do any IO here so probably faster to just do iter
129
121
. iter ( )
130
122
. map ( |source| get_source_dirs ( & package_dir, source. to_owned ( ) ) )
131
123
. collect :: < Vec < AHashSet < ( String , bsconfig:: PackageSource ) > > > ( )
0 commit comments