sapling/eden/scm/exec
David Tolnay 9c6f253858 rust: Replace derive(Fail) with derive(Error)
Summary:
This diff replaces code of the form:

```
use failure::Fail;

#[derive(Fail, Debug)]
pub enum ErrorKind {
    #[fail(display = "something failed {} times", _0)]
    Failed(usize),
}
```

with:

```
use thiserror::Error;

#[derive(Error, Debug)]
pub enum ErrorKind {
    #[error("something failed {0} times")]
    Failed(usize),
}
```

The former emits an implementation of failure 0.1's `Fail` trait while the latter emits an impl of `std::error::Error`. Failure provides a blanket impl of `Fail` for any type that implements `Error`, so these `Error` impls are strictly more general. Each of these error types will continue to have exactly the same `Fail` impl that it did before this change, but now also has the appropriate `std::error::Error` impl which sets us up for dropping our various dependencies on `Fail` throughout the codebase.

Reviewed By: Imxset21

Differential Revision: D18523700

fbshipit-source-id: 0e43b10d5dfa79820663212391ecbf4aeaac2d41
2019-11-14 22:04:38 -08:00
..
hgmain Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
scm_daemon rust: Replace derive(Fail) with derive(Error) 2019-11-14 22:04:38 -08:00
scratch rust: Rename Fallible<T> to Result<T> 2019-11-14 14:11:01 -08:00
utils rust: Rename Fallible<T> to Result<T> 2019-11-14 14:11:01 -08:00