You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0277]: the trait bound `pyo3::PyErr: std::convert::From<std::io::Error>` is not satisfied
--> src/lib.rs:11:17
|
11 | let mut f = fs::File::open(path)?;
| ^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::io::Error>` is not implemented for `pyo3::PyErr`
|
= help: the following implementations were found:
<pyo3::PyErr as std::convert::From<pyo3::PyDowncastError<'p>>>
= note: required by `std::convert::From::from`
This is annoying, makes it hard to use try! or ?. We could implement From trait for some of the Rust error types like std::io::Error.
The text was updated successfully, but these errors were encountered:
messense
changed the title
implemented From to make it easy to convert Rust error types to Python exceptions
Make it easy to convert Rust error types to Python exceptions
Jun 7, 2017
This is annoying, makes it hard to use
try!
or?
. We could implementFrom
trait for some of the Rust error types likestd::io::Error
.The text was updated successfully, but these errors were encountered: