Summary:
`extern crate` is usually no longer needed in 2018 edition of Rust. This diff removes `extern crate` lines from fbcode where possible, replacing #[macro_use] with individual import of macros.
Before:
```
#[macro_use]
extern crate futures_ext;
extern crate serde_json;
```
After:
```
use futures_ext::try_boxfuture;
```
Reviewed By: Imxset21
Differential Revision: D17313537
fbshipit-source-id: 70462a2c161375017b77fa44aba166884ad2fdc3
Summary:
`extension-module-2-7` should only be used for "extension modules". They change
link behavior and can cause issues. In our cases, only "python27-sys" is actually
used.
Reviewed By: farnz
Differential Revision: D16706183
fbshipit-source-id: cd2474556f92bb3697a2d209a790baf063195c50
Summary:
This would be useful for functions that need the `Fallible` return type.
For convenience, it's round-tripable, `py_result.into_fallible().map_pyerr(...)` is `py_result`.
Reviewed By: xavierd
Differential Revision: D16275329
fbshipit-source-id: eb2fbaecf4a232af415054b8decbe860ee2d7863
Summary:
Update all rust crates that compile on Rust 2018 to use the 2018 edition.
The `commitcloudsubscriber` crate only compiles with Rust 2015, so make that
explicit in `Cargo.toml`.
Reviewed By: farnz
Differential Revision: D15601648
fbshipit-source-id: 7380e6e695fc3049913af91fcbde105dfe1be4bc
Summary:
Adds a new crate `cpython-result`, which provides a `ResultExt` trait, which
extends the failure `Result` type to allow coversion to `PyResult` by
converting the error to an appropriate Python Exception.
Reviewed By: quark-zju
Differential Revision: D12980782
fbshipit-source-id: 44a63d31f9ecf2f77efa3b37c68f9a99eaf6d6fa