(&self, entry: &DirEntry, file_name: &str)
| 1033 | } |
| 1034 | |
| 1035 | fn is_in_cache(&self, entry: &DirEntry, file_name: &str) -> bool { |
| 1036 | let is_file = entry.path().is_file(); |
| 1037 | |
| 1038 | let is_file_name = entry |
| 1039 | .file_name() |
| 1040 | .to_str() |
| 1041 | .map(|s| { |
| 1042 | if MACOS.is(self.get_os()) && !self.is_firefox() { |
| 1043 | s.contains(file_name) |
| 1044 | } else { |
| 1045 | s.ends_with(file_name) |
| 1046 | } |
| 1047 | }) |
| 1048 | .unwrap_or(false); |
| 1049 | |
| 1050 | let match_os = entry |
| 1051 | .path() |
| 1052 | .to_str() |
| 1053 | .map(|s| s.contains(self.get_platform_label())) |
| 1054 | .unwrap_or(false); |
| 1055 | |
| 1056 | is_file && is_file_name && match_os |
| 1057 | } |
| 1058 | |
| 1059 | fn is_driver_and_matches_browser_version(&self, entry: &DirEntry) -> bool { |
| 1060 | let match_driver_version = entry |
no test coverage detected