mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
dc5e78c1c1
Summary: Convert scm/mononoke to use failure, and update common/rust crates it depends on as well. What it looks like is a lot of deleted code... General strategy: - common/rust/failure_ext adds some things that are in git failure that aren't yet in crates.io (`bail!` and `ensure!`, `Result<T, Error>`) - everything returns `Result<T, failure::Error>` - crates with real error get an error type, with a derived Fail implementation - replicate error-chain by defining an `enum ErrorKind` where the fields match the declared errors in the error! macro - crates with dummy error-chain (no local errors) lose it - `.chain_err()` -> `.context()` or `.with_context()` So far the only place I've needed to extract an error is in a unit test. Having a single unified error type has simplified a lot of things, and removed a lot of error type parameters, error conversion, etc, etc. Reviewed By: sid0 Differential Revision: D6446584 fbshipit-source-id: 744640ca2997d4a85513c4519017f2e2e78a73f5 |
||
---|---|---|
.. | ||
blobimport | ||
dumprev.rs | ||
idxdump.rs |