Read a Makfile-style dependency file. `f` is called for every target. The first argument is the target, the second is the list of dependencies.
(
file_name: &Path,
f: impl FnMut(RawString, Vec<RawString>) -> Result<(), Error>,
)
| 12 | /// `f` is called for every target. The first argument is the target, the |
| 13 | /// second is the list of dependencies. |
| 14 | pub fn read_deps_file( |
| 15 | file_name: &Path, |
| 16 | f: impl FnMut(RawString, Vec<RawString>) -> Result<(), Error>, |
| 17 | ) -> Result<(), Error> { |
| 18 | let file = File::open(file_name) |
| 19 | .map_err(|e| Error::new(e.kind(), format!("Unable to read {file_name:?}: {e}")))?; |
| 20 | read_deps_file_from(file, f) |
| 21 | } |
| 22 | |
| 23 | /// Read a Makfile-style dependency file. |
| 24 | /// |
no test coverage detected