From 4cae2ae6401526a9fe13ff2d3a3d484dcdf2ff2a Mon Sep 17 00:00:00 2001 From: Agustin Borgna Date: Mon, 4 Sep 2023 10:37:57 +0100 Subject: [PATCH 1/2] Add clippy lint for mut calls in a debug_assert --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index e99fa1ae3..aa386bcd0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,5 @@ #![warn(missing_docs)] +#![warn(clippy::debug_assert_with_mut_call)] //! `hugr` is the Hierarchical Unified Graph Representation of quantum circuits //! and operations in the Quantinuum ecosystem. From 433d429fb60b3e034e0c2196c9d9e6d769093555 Mon Sep 17 00:00:00 2001 From: Agustin Borgna Date: Mon, 4 Sep 2023 16:09:10 +0100 Subject: [PATCH 2/2] Add comments --- src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index aa386bcd0..3b3f3671c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,3 @@ -#![warn(missing_docs)] -#![warn(clippy::debug_assert_with_mut_call)] - //! `hugr` is the Hierarchical Unified Graph Representation of quantum circuits //! and operations in the Quantinuum ecosystem. //! @@ -10,6 +7,11 @@ //! structures. //! +#![warn(missing_docs)] +// Unstable check, may cause false positives. +// https://github.com/rust-lang/rust-clippy/issues/5112 +#![warn(clippy::debug_assert_with_mut_call)] + pub mod algorithm; pub mod builder; pub mod extension;