Remove uneeded imports from `py_class.rs`
This commit is contained in:
parent
580e50f727
commit
df89720e23
|
@ -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};
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue