(dir: &Path, ws: &Workspace, dst: &mut Vec<Crate>)
| 242 | } |
| 243 | |
| 244 | fn find_crates(dir: &Path, ws: &Workspace, dst: &mut Vec<Crate>) { |
| 245 | if dir.join("Cargo.toml").exists() { |
| 246 | let krate = read_crate(Some(ws), &dir.join("Cargo.toml")); |
| 247 | dst.push(krate); |
| 248 | } |
| 249 | |
| 250 | for entry in dir.read_dir().unwrap() { |
| 251 | let entry = entry.unwrap(); |
| 252 | if entry.file_type().unwrap().is_dir() { |
| 253 | find_crates(&entry.path(), ws, dst); |
| 254 | } |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | fn read_crate(ws: Option<&Workspace>, manifest: &Path) -> Crate { |
| 259 | let mut name = None; |