diff --git a/extensions/custom_type.rs b/extensions/custom_type.rs index 1cc0aa25..b4f79534 100644 --- a/extensions/custom_type.rs +++ b/extensions/custom_type.rs @@ -5,7 +5,7 @@ #[macro_use] extern crate cpython; -use cpython::{Python, PyObject, PyType, PyRustObject, PyRustType, PyResult, GILProtected}; +use cpython::{Python, PyObject, PyRustObject, PyRustType, PyResult, GILProtected}; use std::cell::RefCell; static MY_TYPE: GILProtected>>> = GILProtected::new(RefCell::new(None)); diff --git a/src/rustobject/typebuilder.rs b/src/rustobject/typebuilder.rs index 7b14e350..71930fa3 100644 --- a/src/rustobject/typebuilder.rs +++ b/src/rustobject/typebuilder.rs @@ -208,7 +208,7 @@ impl <'p, T, B> PyRustTypeBuilder<'p, T, B> where T: 'static + Send, B: PythonBa /// Sets the constructor (__new__ method) /// /// As `new` argument, use either the `py_fn!()` or the `py_class_method!()` macro. - pub fn set_new(mut self, new: T) -> Self where T: TypeConstructor { + pub fn set_new(mut self, new: N) -> Self where N: TypeConstructor { let tp_new = new.tp_new(); #[cfg(feature="python27-sys")] unsafe {