Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Aug 23, 2022
1 parent 7426aea commit 5c74ddf
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
toolchain: stable
profile: minimal
components: clippy
- run: nox -s clippy
- run: nox -s clippy -- --allow=clippy::borrow_deref_ref --allow=clippy::let_unit_value --allow=clippy::derive-partial-eq-without-eq

check-target:
needs: [fmt]
Expand Down
1 change: 1 addition & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def clippy(session: nox.Session) -> None:
"--workspace",
"--",
"--deny=warnings",
*session.posargs,
external=True,
)

Expand Down
2 changes: 1 addition & 1 deletion pyo3-macros-backend/src/proto_method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ fn insert_lifetime(ty: &mut syn::Type) {
match ty {
syn::Type::Reference(ref mut r) => {
r.lifetime.get_or_insert(syn::parse_quote! {'p});
insert_lifetime(&mut *r.elem);
insert_lifetime(&mut r.elem);
}
syn::Type::Path(ref mut path) => insert_lifetime_for_path(path),
_ => {}
Expand Down
2 changes: 1 addition & 1 deletion src/gil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ mod tests {
let obj: Arc<Py<PyAny>> = Arc::new(get_object(py));
let thread_obj = Arc::clone(&obj);

let count = (&*obj).get_refcnt(py);
let count = obj.get_refcnt(py);
println!(
"1: The object has been created and its reference count is {}",
count
Expand Down
1 change: 1 addition & 0 deletions src/pyclass.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::type_complexity)]
//! `PyClass` and related traits.
use crate::{
callback::IntoPyCallbackOutput,
Expand Down
1 change: 1 addition & 0 deletions src/type_object.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::type_complexity)]
// Copyright (c) 2017-present PyO3 Project and Contributors
//! Python type object information

Expand Down

0 comments on commit 5c74ddf

Please sign in to comment.