-
-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[commitgraph] Clean up
{file,graph}::verify::Error
types.
Get rid of `file::verify::EitherError` in favor of having `graph::verify::Error` manually copy file errors into the graph error object. So: 1. `graph::verify::Error`'s `File` variant uses a dummy type parameter for its nested `file::verify::Error` value. This dummy type parameter is essentially a never type, as `graph::verify::Error::File(file::verify::Error::Processor(...))` is not valid. 2. `Graph::verify_integrity` calls `File::traverse` with its normal error type (`graph::verify::Error`) also serving as the processor's error type. 3. `Graph::traverse` propagates processor errors to its caller via `Error::Processor(err)`. 4. `Graph::verify_integrity` manually transcribes `file::verify::Error<T>` variants into `file::verify::Error<NeverType>` variants before embedding the file error into `graph::verify::Error::File` variants.
- Loading branch information
1 parent
2571113
commit fa22cab
Showing
3 changed files
with
64 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters