diff --git a/pyo3cls/src/lib.rs b/pyo3cls/src/lib.rs index f6fcac15..c414249c 100644 --- a/pyo3cls/src/lib.rs +++ b/pyo3cls/src/lib.rs @@ -51,8 +51,7 @@ pub fn mod3init( input: proc_macro::TokenStream, ) -> proc_macro::TokenStream { // Parse the token stream into a syntax tree - let mut ast: syn::ItemFn = - syn::parse(input).expect("#[pymodule] must be used on a `fn` block"); + let mut ast: syn::ItemFn = syn::parse(input).expect("#[pymodule] must be used on a `fn` block"); let modname: syn::Ident; if attr.is_empty() { diff --git a/src/python.rs b/src/python.rs index 76b666da..3ca04cf3 100644 --- a/src/python.rs +++ b/src/python.rs @@ -14,8 +14,8 @@ use crate::types::{PyDict, PyModule, PyObjectRef, PyType}; use std; use std::ffi::CString; use std::marker::PhantomData; -use std::ptr::NonNull; use std::os::raw::c_int; +use std::ptr::NonNull; /// Marker type that indicates that the GIL is currently held. /// diff --git a/src/pythonrun.rs b/src/pythonrun.rs index 1cfcea1b..3b98827d 100644 --- a/src/pythonrun.rs +++ b/src/pythonrun.rs @@ -280,7 +280,7 @@ impl GILGuard { #[cfg(test)] mod test { - use super::{GILPool, ReleasePool, POOL, NonNull}; + use super::{GILPool, NonNull, ReleasePool, POOL}; use crate::conversion::ToPyObject; use crate::object::PyObject; use crate::python::{Python, ToPyPointer};