Fix a scope in the macro output

This commit is contained in:
konstin 2018-06-18 15:45:15 +02:00
parent e374b5dd1d
commit aadde4cd0c
1 changed files with 1 additions and 2 deletions

View File

@ -50,8 +50,7 @@ fn check_generic(name: &syn::Ident, sig: &syn::MethodSig) {
pub fn body_to_result(body: &TokenStream, spec: &FnSpec) -> TokenStream {
let output = &spec.output;
quote! {
use pyo3::ReturnTypeIntoPyResult;
let _result: PyResult<<#output as ReturnTypeIntoPyResult>::Inner> = {
let _result: ::pyo3::PyResult<<#output as ::pyo3::ReturnTypeIntoPyResult>::Inner> = {
#body
};
}