True when `path` does not exist, is not a directory, or contains no entries. Any read error is treated as "cold" so we err toward prewarming rather than blocking.
(path: &Path)
| 116 | /// entries. Any read error is treated as "cold" so we err toward prewarming |
| 117 | /// rather than blocking. |
| 118 | fn dir_is_missing_or_empty(path: &Path) -> bool { |
| 119 | match std::fs::read_dir(path) { |
| 120 | Ok(mut entries) => entries.next().is_none(), |
| 121 | Err(_) => true, |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | /// Path to the private Rust diagnostics cargo target dir. Exposed so callers |
| 126 | /// can surface it in prewarm status messages. |
no outgoing calls
no test coverage detected