Remove uneeded imports from `py_class.rs`

This commit is contained in:
Martin Larralde 2018-05-14 13:56:58 +02:00
parent 580e50f727
commit df89720e23
3 changed files with 3 additions and 4 deletions

View File

@ -1,10 +1,9 @@
// Copyright (c) 2017-present PyO3 Project and Contributors
use std;
use std::collections::HashMap;
use syn;
use quote::{Tokens, ToTokens};
use quote::Tokens;
use utils;
use method::{FnType, FnSpec, FnArg};

View File

@ -10,7 +10,7 @@ pub fn build_py_methods(ast: &mut syn::ItemImpl) -> Tokens {
if ast.trait_.is_some() {
panic!("#[methods] can not be used only with trait impl block");
} else {
impl_methods(&iimpl.self_ty, &mut iimpl.items)
impl_methods(&ast.self_ty, &mut ast.items)
}
}

View File

@ -49,7 +49,7 @@ pub fn build_py_proto(ast: &mut syn::ItemImpl) -> Tokens {
let mut seg = path.segments.pop().unwrap().into_value();
seg.arguments = syn::PathArguments::AngleBracketed(parse_quote!{<'p>});
path.segments.push(seg);
expr.generics.params = parse_quote!{'p};
ast.generics.params = parse_quote!{'p};
tokens
} else {