@@ -16,6 +16,8 @@ use crate::{
1616 Error , ErrorKind , OutputKind ,
1717} ;
1818
19+ pub ( crate ) type CompilerFamilyLookupCache = HashMap < Box < Path > , ToolFamily > ;
20+
1921/// Configuration used to represent an invocation of a C compiler.
2022///
2123/// This can be used to figure out what compiler is in use, what the arguments
@@ -40,7 +42,7 @@ pub struct Tool {
4042impl Tool {
4143 pub ( crate ) fn new (
4244 path : PathBuf ,
43- cached_compiler_family : & RwLock < HashMap < Box < Path > , ToolFamily > > ,
45+ cached_compiler_family : & RwLock < CompilerFamilyLookupCache > ,
4446 cargo_output : & CargoOutput ,
4547 out_dir : Option < & Path > ,
4648 ) -> Self {
@@ -57,7 +59,7 @@ impl Tool {
5759 pub ( crate ) fn with_args (
5860 path : PathBuf ,
5961 args : Vec < String > ,
60- cached_compiler_family : & RwLock < HashMap < Box < Path > , ToolFamily > > ,
62+ cached_compiler_family : & RwLock < CompilerFamilyLookupCache > ,
6163 cargo_output : & CargoOutput ,
6264 out_dir : Option < & Path > ,
6365 ) -> Self {
@@ -90,7 +92,7 @@ impl Tool {
9092 path : PathBuf ,
9193 args : Vec < String > ,
9294 cuda : bool ,
93- cached_compiler_family : & RwLock < HashMap < Box < Path > , ToolFamily > > ,
95+ cached_compiler_family : & RwLock < CompilerFamilyLookupCache > ,
9496 cargo_output : & CargoOutput ,
9597 out_dir : Option < & Path > ,
9698 ) -> Self {
0 commit comments