(dot_dir: &Path)
| 1389 | } |
| 1390 | |
| 1391 | fn endpoint_name(dot_dir: &Path) -> String { |
| 1392 | let canonical = std::fs::canonicalize(dot_dir).unwrap_or_else(|_| dot_dir.to_path_buf()); |
| 1393 | let digest = blake3::hash(canonical.to_string_lossy().as_bytes()) |
| 1394 | .to_hex() |
| 1395 | .to_string(); |
| 1396 | endpoint_for_digest(&digest[..24]) |
| 1397 | } |
| 1398 | |
| 1399 | #[cfg(unix)] |
| 1400 | fn endpoint_for_digest(digest: &str) -> String { |
no test coverage detected