(path: &Path)
| 243 | } |
| 244 | |
| 245 | fn canonicalize_test_db_path(path: &Path) -> PathBuf { |
| 246 | let parent = path |
| 247 | .parent() |
| 248 | .unwrap_or_else(|| panic!("test DB path '{}' has no parent", path.display())); |
| 249 | canonicalize_test_dir(parent).join( |
| 250 | path.file_name() |
| 251 | .unwrap_or_else(|| panic!("test DB path '{}' has no file name", path.display())), |
| 252 | ) |
| 253 | } |
| 254 | |
| 255 | pub fn canonical_existing_path(path: &Path) -> PathBuf { |
| 256 | path.canonicalize().unwrap_or_else(|_| path.to_path_buf()) |
no test coverage detected