Finds the workspace root by searching for Cargo.toml upward from the current directory
()
| 49 | |
| 50 | /// Finds the workspace root by searching for Cargo.toml upward from the current directory |
| 51 | fn find_workspace_root() -> Result<PathBuf> { |
| 52 | let mut dir = current_dir()?; |
| 53 | while !dir.join("Cargo.toml").exists() { |
| 54 | dir = dir.parent().ok_or_else(|| anyhow!("Could not find workspace"))?.to_path_buf(); |
| 55 | } |
| 56 | Ok(dir) |
| 57 | } |
| 58 | |
| 59 | /// Fetches content from a URL, using cached content if it's fresh enough |
| 60 | /// |
no outgoing calls
no test coverage detected