Skip to content

Commit

Permalink
Remove use of unwrap (#1888)
Browse files Browse the repository at this point in the history
* Remove use of unwrap

* Update changelog

* Update CHANGELOG.md

Co-authored-by: Mo Mirza <mo.mirza@iwoca.co.uk>
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
  • Loading branch information
3 people committed Sep 26, 2021
1 parent 97fa3f7 commit 4a34cc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix building with a conda environment on Windows. [#1873](https://github.com/PyO3/pyo3/pull/1873)
- Fix panic on Python 3.6 when calling `Python::with_gil` with Python initialized but threading not initialized. [#1874](https://github.com/PyO3/pyo3/pull/1874)
- Fix incorrect linking to version-specific DLL instead of `python3.dll` when cross-compiling to Windows with `abi3`. [#1880](https://github.com/PyO3/pyo3/pull/1880)
- Fix panic in generated `#[derive(FromPyObject)]` for enums. [#1888](https://github.com/PyO3/pyo3/pull/1888)

## [0.14.5] - 2021-09-05

Expand Down
2 changes: 1 addition & 1 deletion pyo3-macros-backend/src/from_pyobject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl<'a> Enum<'a> {
ok @ ::std::result::Result::Ok(_) => return ok,
::std::result::Result::Err(inner) => {
let py = ::pyo3::PyNativeType::py(obj);
err_reasons.push_str(&::std::format!("{}\n", inner.instance(py).str().unwrap()));
err_reasons.push_str(&::std::format!("{}\n", inner.instance(py).str()?));
}
}
);
Expand Down

0 comments on commit 4a34cc6

Please sign in to comment.