Merge pull request #1402 from maffoo/macro-result

Use fully-qualified Result in pyobject_native_type_base
This commit is contained in:
David Hewitt 2021-01-26 21:57:17 +00:00 committed by GitHub
commit 26368eea66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -18,9 +18,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Mark FFI definitions `PyListObject` and those from `funcobject.h` as requiring non-limited API. [#1387](https://github.com/PyO3/pyo3/pull/1387)
- Fix typo in FFI definition `PyFunction_Code` to `PyFunction_GetCode`. [#1387](https://github.com/PyO3/pyo3/pull/1387)
### Fixed
- Fix support for using `r#raw_idents` as argument names in pyfunctions. [#1383](https://github.com/PyO3/pyo3/pull/1383)
- Fix unqualified `Result` usage in `pyobject_native_type_base`. [#1402](https://github.com/PyO3/pyo3/pull/1402)
## [0.13.1] - 2021-01-10
### Added

View File

@ -35,7 +35,7 @@ macro_rules! pyobject_native_type_base(
impl<$($generics,)*> std::fmt::Debug for $name {
fn fmt(&self, f: &mut std::fmt::Formatter)
-> Result<(), std::fmt::Error>
-> std::result::Result<(), std::fmt::Error>
{
let s = self.repr().map_err(|_| std::fmt::Error)?;
f.write_str(&s.to_string_lossy())
@ -44,7 +44,7 @@ macro_rules! pyobject_native_type_base(
impl<$($generics,)*> std::fmt::Display for $name {
fn fmt(&self, f: &mut std::fmt::Formatter)
-> Result<(), std::fmt::Error>
-> std::result::Result<(), std::fmt::Error>
{
let s = self.str().map_err(|_| std::fmt::Error)?;
f.write_str(&s.to_string_lossy())