@@ -16,6 +16,8 @@ use crate::{
16
16
Error , ErrorKind , OutputKind ,
17
17
} ;
18
18
19
+ pub ( crate ) type CompilerFamilyLookupCache = HashMap < Box < Path > , ToolFamily > ;
20
+
19
21
/// Configuration used to represent an invocation of a C compiler.
20
22
///
21
23
/// This can be used to figure out what compiler is in use, what the arguments
@@ -40,7 +42,7 @@ pub struct Tool {
40
42
impl Tool {
41
43
pub ( crate ) fn new (
42
44
path : PathBuf ,
43
- cached_compiler_family : & RwLock < HashMap < Box < Path > , ToolFamily > > ,
45
+ cached_compiler_family : & RwLock < CompilerFamilyLookupCache > ,
44
46
cargo_output : & CargoOutput ,
45
47
out_dir : Option < & Path > ,
46
48
) -> Self {
@@ -57,7 +59,7 @@ impl Tool {
57
59
pub ( crate ) fn with_args (
58
60
path : PathBuf ,
59
61
args : Vec < String > ,
60
- cached_compiler_family : & RwLock < HashMap < Box < Path > , ToolFamily > > ,
62
+ cached_compiler_family : & RwLock < CompilerFamilyLookupCache > ,
61
63
cargo_output : & CargoOutput ,
62
64
out_dir : Option < & Path > ,
63
65
) -> Self {
@@ -90,7 +92,7 @@ impl Tool {
90
92
path : PathBuf ,
91
93
args : Vec < String > ,
92
94
cuda : bool ,
93
- cached_compiler_family : & RwLock < HashMap < Box < Path > , ToolFamily > > ,
95
+ cached_compiler_family : & RwLock < CompilerFamilyLookupCache > ,
94
96
cargo_output : & CargoOutput ,
95
97
out_dir : Option < & Path > ,
96
98
) -> Self {
0 commit comments