Merge pull request #1402 from maffoo/macro-result
Use fully-qualified Result in pyobject_native_type_base
This commit is contained in:
commit
26368eea66
|
@ -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)
|
- 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)
|
- Fix typo in FFI definition `PyFunction_Code` to `PyFunction_GetCode`. [#1387](https://github.com/PyO3/pyo3/pull/1387)
|
||||||
|
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fix support for using `r#raw_idents` as argument names in pyfunctions. [#1383](https://github.com/PyO3/pyo3/pull/1383)
|
- 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
|
## [0.13.1] - 2021-01-10
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -35,7 +35,7 @@ macro_rules! pyobject_native_type_base(
|
||||||
|
|
||||||
impl<$($generics,)*> std::fmt::Debug for $name {
|
impl<$($generics,)*> std::fmt::Debug for $name {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter)
|
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)?;
|
let s = self.repr().map_err(|_| std::fmt::Error)?;
|
||||||
f.write_str(&s.to_string_lossy())
|
f.write_str(&s.to_string_lossy())
|
||||||
|
@ -44,7 +44,7 @@ macro_rules! pyobject_native_type_base(
|
||||||
|
|
||||||
impl<$($generics,)*> std::fmt::Display for $name {
|
impl<$($generics,)*> std::fmt::Display for $name {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter)
|
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)?;
|
let s = self.str().map_err(|_| std::fmt::Error)?;
|
||||||
f.write_str(&s.to_string_lossy())
|
f.write_str(&s.to_string_lossy())
|
||||||
|
|
Loading…
Reference in New Issue