Repository: ergoplatform/sigma-rust (language: rust)

Issue:
Update CI to rustc 1.63 and fix clippy issues



Discussion / hints:

Fix patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 46da50d6f..cf92ec181 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -11,7 +11,7 @@ on:
       - synchronize
 
 env:
-  RUSTV: '1.62'
+  RUSTV: '1.63'
 
 jobs:
   build_wo_default_features:
diff --git a/bindings/ergo-lib-c-core/src/context_extension.rs b/bindings/ergo-lib-c-core/src/context_extension.rs
index bea457dec..d42651706 100644
--- a/bindings/ergo-lib-c-core/src/context_extension.rs
+++ b/bindings/ergo-lib-c-core/src/context_extension.rs
@@ -5,7 +5,7 @@ use crate::{
 use ergo_lib::ergotree_interpreter::sigma_protocol::prover;
 
 /// User-defined variables to be put into context
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct ContextExtension(pub prover::ContextExtension);
 pub type ContextExtensionPtr = *mut ContextExtension;
 pub type ConstContextExtensionPtr = *const ContextExtension;
diff --git a/bindings/ergo-lib-c-core/src/data_input.rs b/bindings/ergo-lib-c-core/src/data_input.rs
index 9320a6bb3..2532122a5 100644
--- a/bindings/ergo-lib-c-core/src/data_input.rs
+++ b/bindings/ergo-lib-c-core/src/data_input.rs
@@ -9,7 +9,7 @@ use crate::{
 };
 
 /// Inputs, that are used to enrich script context, but won't be spent by the transaction
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct DataInput(pub chain::transaction::DataInput);
 pub type DataInputPtr = *mut DataInput;
 pub type ConstDataInputPtr = *const DataInput;
diff --git a/bindings/ergo-lib-c-core/src/input.rs b/bindings/ergo-lib-c-core/src/input.rs
index d9b8c7ddc..59dd74887 100644
--- a/bindings/ergo-lib-c-core/src/input.rs
+++ b/bindings/ergo-lib-c-core/src/input.rs
@@ -10,7 +10,7 @@ use crate::{
 };
 
 /// Unsigned inputs used in constructing unsigned transactions
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct UnsignedInput(pub chain::transaction::UnsignedInput);
 pub type UnsignedInputPtr = *mut UnsignedInput;
 pub type ConstUnsignedInputPtr = *const UnsignedInput;
@@ -40,7 +40,7 @@ pub unsafe fn unsigned_input_context_extension(
 }
 
 /// Signed inputs used in signed transactions
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct Input(pub(crate) chain::transaction::Input);
 pub type InputPtr = *mut Input;
 pub type ConstInputPtr = *const Input;
@@ -70,7 +70,7 @@ pub unsafe fn input_spending_proof(
 }
 
 /// Proof of correctness of tx spending
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct ProverResult(chain::transaction::input::prover_result::ProverResult);
 pub type ProverResultPtr = *mut ProverResult;
 pub type ConstProverResultPtr = *const ProverResult;
diff --git a/bindings/ergo-lib-c-core/src/reduced.rs b/bindings/ergo-lib-c-core/src/reduced.rs
index 61580e08a..d58ac3948 100644
--- a/bindings/ergo-lib-c-core/src/reduced.rs
+++ b/bindings/ergo-lib-c-core/src/reduced.rs
@@ -51,7 +51,7 @@ pub unsafe fn propositions_add_proposition_from_bytes(
 /// in an environment where secrets are known.
 /// see EIP-19 for more details -
 /// <https://github.com/ergoplatform/eips/blob/f280890a4163f2f2e988a0091c078e36912fc531/eip-0019.md>
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct ReducedTransaction(pub(crate) ergo_lib::chain::transaction::reduced::ReducedTransaction);
 pub type ReducedTransactionPtr = *mut ReducedTransaction;
 pub type ConstReducedTransactionPtr = *const ReducedTransaction;
diff --git a/bindings/ergo-lib-c-core/src/secret_key.rs b/bindings/ergo-lib-c-core/src/secret_key.rs
index 1fa76a4ff..90770db8f 100644
--- a/bindings/ergo-lib-c-core/src/secret_key.rs
+++ b/bindings/ergo-lib-c-core/src/secret_key.rs
@@ -8,7 +8,7 @@ use crate::util::{const_ptr_as_ref, mut_ptr_as_mut};
 use crate::Error;
 
 /// Secret key for the prover
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct SecretKey(pub(crate) wallet::secret_key::SecretKey);
 pub type SecretKeyPtr = *mut SecretKey;
 pub type ConstSecretKeyPtr = *const SecretKey;
diff --git a/bindings/ergo-lib-c-core/src/transaction.rs b/bindings/ergo-lib-c-core/src/transaction.rs
index e34e83efa..6cbc5c4f5 100644
--- a/bindings/ergo-lib-c-core/src/transaction.rs
+++ b/bindings/ergo-lib-c-core/src/transaction.rs
@@ -165,7 +165,7 @@ pub unsafe fn transaction_extract_hints(
 }
 
 /// Unsigned (inputs without proofs) transaction
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct UnsignedTransaction(pub(crate) chain::transaction::unsigned::UnsignedTransaction);
 pub type UnsignedTransactionPtr = *mut UnsignedTransaction;
 pub type ConstUnsignedTransactionPtr = *const UnsignedTransaction;
diff --git a/bindings/ergo-lib-wasm/src/context_extension.rs b/bindings/ergo-lib-wasm/src/context_extension.rs
index 18db6544f..e2eeaf27f 100644
--- a/bindings/ergo-lib-wasm/src/context_extension.rs
+++ b/bindings/ergo-lib-wasm/src/context_extension.rs
@@ -9,7 +9,7 @@ use derive_more::{From, Into};
 
 /// User-defined variables to be put into context
 #[wasm_bindgen]
-#[derive(PartialEq, Debug, Clone, From, Into)]
+#[derive(PartialEq, Eq, Debug, Clone, From, Into)]
 pub struct ContextExtension(
     ergo_lib::ergotree_interpreter::sigma_protocol::prover::ContextExtension,
 );
diff --git a/bindings/ergo-lib-wasm/src/input.rs b/bindings/ergo-lib-wasm/src/input.rs
index fc15b35d1..0850ffa1c 100644
--- a/bindings/ergo-lib-wasm/src/input.rs
+++ b/bindings/ergo-lib-wasm/src/input.rs
@@ -11,7 +11,7 @@ use derive_more::{From, Into};
 
 /// Unsigned inputs used in constructing unsigned transactions
 #[wasm_bindgen]
-#[derive(PartialEq, Debug, Clone, From, Into)]
+#[derive(PartialEq, Eq, Debug, Clone, From, Into)]
 pub struct UnsignedInput(chain::transaction::UnsignedInput);
 
 #[wasm_bindgen]
@@ -47,7 +47,7 @@ impl UnsignedInput {
 
 /// Collection of unsigned signed inputs
 #[wasm_bindgen]
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct UnsignedInputs(Vec<UnsignedInput>);
 
 #[wasm_bindgen]
@@ -87,7 +87,7 @@ impl From<Vec<chain::transaction::UnsignedInput>> for UnsignedInputs {
 
 /// Signed inputs used in signed transactions
 #[wasm_bindgen]
-#[derive(PartialEq, Debug, Clone, From, Into)]
+#[derive(PartialEq, Eq, Debug, Clone, From, Into)]
 pub struct Input(chain::transaction::Input);
 
 #[wasm_bindgen]
@@ -105,7 +105,7 @@ impl Input {
 
 /// Collection of signed inputs
 #[wasm_bindgen]
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct Inputs(Vec<Input>);
 
 #[wasm_bindgen]
diff --git a/bindings/ergo-lib-wasm/src/prover_result.rs b/bindings/ergo-lib-wasm/src/prover_result.rs
index 7d3331855..2381cf979 100644
--- a/bindings/ergo-lib-wasm/src/prover_result.rs
+++ b/bindings/ergo-lib-wasm/src/prover_result.rs
@@ -8,7 +8,7 @@ use derive_more::{From, Into};
 
 /// Proof of correctness of tx spending
 #[wasm_bindgen]
-#[derive(PartialEq, Debug, Clone, From, Into)]
+#[derive(PartialEq, Eq, Debug, Clone, From, Into)]
 pub struct ProverResult(ergo_lib::chain::transaction::input::prover_result::ProverResult);
 
 #[wasm_bindgen]
diff --git a/bindings/ergo-lib-wasm/src/secret_key.rs b/bindings/ergo-lib-wasm/src/secret_key.rs
index 7f3d8a685..c41db749f 100644
--- a/bindings/ergo-lib-wasm/src/secret_key.rs
+++ b/bindings/ergo-lib-wasm/src/secret_key.rs
@@ -12,7 +12,7 @@ use derive_more::{From, Into};
 
 /// Secret key for the prover
 #[wasm_bindgen]
-#[derive(PartialEq, Debug, Clone, From, Into)]
+#[derive(PartialEq, Eq, Debug, Clone, From, Into)]
 pub struct SecretKey(wallet::secret_key::SecretKey);
 
 #[wasm_bindgen]
diff --git a/bindings/ergo-lib-wasm/src/transaction.rs b/bindings/ergo-lib-wasm/src/transaction.rs
index 54e7d88a1..0f2287a41 100644
--- a/bindings/ergo-lib-wasm/src/transaction.rs
+++ b/bindings/ergo-lib-wasm/src/transaction.rs
@@ -277,7 +277,7 @@ impl From<chain::transaction::Transaction> for Transaction {
 
 /// Unsigned (inputs without proofs) transaction
 #[wasm_bindgen]
-#[derive(PartialEq, Debug, Clone, From, Into)]
+#[derive(PartialEq, Eq, Debug, Clone, From, Into)]
 pub struct UnsignedTransaction(pub(crate) chain::transaction::unsigned::UnsignedTransaction);
 
 #[wasm_bindgen]
diff --git a/bindings/ergo-lib-wasm/src/transaction/reduced.rs b/bindings/ergo-lib-wasm/src/transaction/reduced.rs
index 3834365c0..83d670edf 100644
--- a/bindings/ergo-lib-wasm/src/transaction/reduced.rs
+++ b/bindings/ergo-lib-wasm/src/transaction/reduced.rs
@@ -39,7 +39,7 @@ impl Propositions {
 /// see EIP-19 for more details -
 /// <https://github.com/ergoplatform/eips/blob/f280890a4163f2f2e988a0091c078e36912fc531/eip-0019.md>
 #[wasm_bindgen]
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct ReducedTransaction(ergo_lib::chain::transaction::reduced::ReducedTransaction);
 
 #[wasm_bindgen]
diff --git a/bindings/ergo-lib-wasm/src/wallet/ext_secret_key.rs b/bindings/ergo-lib-wasm/src/wallet/ext_secret_key.rs
index 632ffe533..7bb7968fd 100644
--- a/bindings/ergo-lib-wasm/src/wallet/ext_secret_key.rs
+++ b/bindings/ergo-lib-wasm/src/wallet/ext_secret_key.rs
@@ -16,7 +16,7 @@ use derive_more::{From, Into};
 
 /// Extented secret key implemented according to BIP-32
 #[wasm_bindgen]
-#[derive(PartialEq, Debug, Clone, From, Into)]
+#[derive(PartialEq, Eq, Debug, Clone, From, Into)]
 pub struct ExtSecretKey(InnerExtSecretKey);
 
 #[wasm_bindgen]
diff --git a/bindings/ergo-lib-wasm/src/wallet/mnemonic.rs b/bindings/ergo-lib-wasm/src/wallet/mnemonic.rs
index 45df1bc0b..040ab77f5 100644
--- a/bindings/ergo-lib-wasm/src/wallet/mnemonic.rs
+++ b/bindings/ergo-lib-wasm/src/wallet/mnemonic.rs
@@ -7,7 +7,7 @@ use wasm_bindgen::prelude::wasm_bindgen;
 
 /// Mnemonic
 #[wasm_bindgen]
-#[derive(PartialEq, Debug, Clone, From)]
+#[derive(PartialEq, Eq, Debug, Clone, From)]
 pub struct Mnemonic {}
 
 #[wasm_bindgen]
diff --git a/ergo-lib/src/chain/json/transaction.rs b/ergo-lib/src/chain/json/transaction.rs
index 39d9c95c2..7a94e5748 100644
--- a/ergo-lib/src/chain/json/transaction.rs
+++ b/ergo-lib/src/chain/json/transaction.rs
@@ -8,7 +8,7 @@ use ergotree_ir::chain::ergo_box::ErgoBoxCandidate;
 use ergotree_ir::chain::tx_id::TxId;
 use serde::{Deserialize, Serialize};
 
-#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
+#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
 pub struct TransactionJson {
     #[cfg_attr(feature = "json", serde(rename = "id"))]
     pub tx_id: TxId,
@@ -24,7 +24,7 @@ pub struct TransactionJson {
     pub outputs: Vec<ErgoBox>,
 }
 
-#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
+#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
 pub struct UnsignedTransactionJson {
     /// unsigned inputs, that will be spent by this transaction.
     #[cfg_attr(feature = "json", serde(rename = "inputs"))]
diff --git a/ergo-lib/src/chain/transaction.rs b/ergo-lib/src/chain/transaction.rs
index 50090f9ce..50837442c 100644
--- a/ergo-lib/src/chain/transaction.rs
+++ b/ergo-lib/src/chain/transaction.rs
@@ -50,7 +50,7 @@ use std::iter::FromIterator;
         into = "super::json::transaction::TransactionJson"
     )
 )]
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct Transaction {
     /// transaction id
     pub(crate) tx_id: TxId,
diff --git a/ergo-lib/src/chain/transaction/input.rs b/ergo-lib/src/chain/transaction/input.rs
index d7a73f87d..83951df1b 100644
--- a/ergo-lib/src/chain/transaction/input.rs
+++ b/ergo-lib/src/chain/transaction/input.rs
@@ -22,7 +22,7 @@ use serde::{Deserialize, Serialize};
 use self::prover_result::ProverResult;
 
 /// Unsigned (without proofs) transaction input
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 #[cfg_attr(test, derive(proptest_derive::Arbitrary))]
 #[cfg_attr(feature = "json", derive(Deserialize))]
 pub struct UnsignedInput {
@@ -68,7 +68,7 @@ impl<T: ErgoBoxId> From<T> for UnsignedInput {
 }
 
 /// Fully signed transaction input
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 #[cfg_attr(test, derive(proptest_derive::Arbitrary))]
 #[cfg_attr(feature = "json", derive(Serialize, Deserialize))]
 pub struct Input {
diff --git a/ergo-lib/src/chain/transaction/input/prover_result.rs b/ergo-lib/src/chain/transaction/input/prover_result.rs
index c200d283d..00e7b60cf 100644
--- a/ergo-lib/src/chain/transaction/input/prover_result.rs
+++ b/ergo-lib/src/chain/transaction/input/prover_result.rs
@@ -17,7 +17,7 @@ use serde::{Deserialize, Serialize};
 
 /// Wrapped IR [`ProverResult`] for Serde
 #[cfg_attr(feature = "json", derive(Deserialize))]
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct ProverResult {
     /// proof that satisfies final sigma proposition
     #[cfg_attr(
diff --git a/ergo-lib/src/chain/transaction/reduced.rs b/ergo-lib/src/chain/transaction/reduced.rs
index ec357f496..57f427dd8 100644
--- a/ergo-lib/src/chain/transaction/reduced.rs
+++ b/ergo-lib/src/chain/transaction/reduced.rs
@@ -28,7 +28,7 @@ use super::TxIoVec;
 /// Input box script reduced to SigmaBoolean
 /// see EIP-19 for more details -
 /// <https://github.com/ergoplatform/eips/blob/f280890a4163f2f2e988a0091c078e36912fc531/eip-0019.md>
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct ReducedInput {
     /// Input box script reduced to SigmaBoolean
     pub reduction_result: ReductionResult,
@@ -45,7 +45,7 @@ pub struct ReducedInput {
 /// <https://github.com/ergoplatform/eips/blob/f280890a4163f2f2e988a0091c078e36912fc531/eip-0019.md>
 /// Reference Scala implementation -
 /// <https://github.com/ergoplatform/ergo-appkit/blob/1b7347caa863ecb0b9ba49ae57b090d1f386c906/common/src/main/java/org/ergoplatform/appkit/AppkitProvingInterpreter.scala#L261-L266>
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct ReducedTransaction {
     /// Unsigned transation
     pub unsigned_tx: UnsignedTransaction,
diff --git a/ergo-lib/src/chain/transaction/unsigned.rs b/ergo-lib/src/chain/transaction/unsigned.rs
index 76e65091f..ac8ee4152 100644
--- a/ergo-lib/src/chain/transaction/unsigned.rs
+++ b/ergo-lib/src/chain/transaction/unsigned.rs
@@ -25,7 +25,7 @@ use std::convert::TryInto;
         into = "crate::chain::json::transaction::UnsignedTransactionJson"
     )
 )]
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct UnsignedTransaction {
     tx_id: TxId,
     /// unsigned inputs, that will be spent by this transaction.
diff --git a/ergo-lib/src/wallet/ext_secret_key.rs b/ergo-lib/src/wallet/ext_secret_key.rs
index 54aef15b8..6fdfa463f 100644
--- a/ergo-lib/src/wallet/ext_secret_key.rs
+++ b/ergo-lib/src/wallet/ext_secret_key.rs
@@ -27,7 +27,7 @@ type HmacSha512 = Hmac<Sha512>;
 
 /// Extended secret key
 /// implemented according to BIP-32
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct ExtSecretKey {
     /// The secret key
     private_input: DlogProverInput,
diff --git a/ergo-lib/src/wallet/mnemonic.rs b/ergo-lib/src/wallet/mnemonic.rs
index aa8a4e993..90c8d1714 100644
--- a/ergo-lib/src/wallet/mnemonic.rs
+++ b/ergo-lib/src/wallet/mnemonic.rs
@@ -13,7 +13,7 @@ const SHA512_OUTPUT_LEN: usize = 512 / 8;
 pub type MnemonicSeed = [u8; SHA512_OUTPUT_LEN];
 
 /// Mnemonic type
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct Mnemonic();
 
 impl Mnemonic {
diff --git a/ergo-lib/src/wallet/mnemonic_generator.rs b/ergo-lib/src/wallet/mnemonic_generator.rs
index f4db840c9..d1cf51844 100644
--- a/ergo-lib/src/wallet/mnemonic_generator.rs
+++ b/ergo-lib/src/wallet/mnemonic_generator.rs
@@ -7,7 +7,7 @@ use std::{fmt, str::FromStr};
 use thiserror::Error;
 
 /// Supported languages for mnemonic phrases
-#[derive(Debug, Clone, Copy, PartialEq)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
 pub enum Language {
     /// Simplified Chinese wordlist
     ChineseSimplified,
@@ -113,7 +113,7 @@ impl WordList {
 }
 
 /// Mnemonic generator type
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct MnemonicGenerator {
     lang: Language,
     strength: u32,
diff --git a/ergo-lib/src/wallet/secret_key.rs b/ergo-lib/src/wallet/secret_key.rs
index f51208251..2383d92d6 100644
--- a/ergo-lib/src/wallet/secret_key.rs
+++ b/ergo-lib/src/wallet/secret_key.rs
@@ -4,7 +4,7 @@ use ergotree_interpreter::sigma_protocol::private_input::PrivateInput;
 use ergotree_ir::chain::address::Address;
 
 /// Types of secrets
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub enum SecretKey {
     /// Secret exponent of a group element, i.e. secret w such as h = g^^w, where g is group generator, h is a public key.
     DlogSecretKey(DlogProverInput),
diff --git a/ergo-lib/src/wallet/tx_context.rs b/ergo-lib/src/wallet/tx_context.rs
index 8ab95f99f..2bf743e07 100644
--- a/ergo-lib/src/wallet/tx_context.rs
+++ b/ergo-lib/src/wallet/tx_context.rs
@@ -8,7 +8,7 @@ use ergotree_interpreter::eval::context::TxIoVec;
 use super::signing::{ErgoTransaction, TxSigningError};
 
 /// Transaction and an additional info required for signing
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct TransactionContext<T: ErgoTransaction> {
     /// Unsigned transaction to sign
     pub spending_tx: T,
diff --git a/ergo-nipopow/src/autolykos_pow_scheme.rs b/ergo-nipopow/src/autolykos_pow_scheme.rs
index 69f10878f..f43c68fd5 100644
--- a/ergo-nipopow/src/autolykos_pow_scheme.rs
+++ b/ergo-nipopow/src/autolykos_pow_scheme.rs
@@ -189,7 +189,7 @@ fn as_unsigned_byte_array(
     Ok(res)
 }
 
-#[derive(PartialEq, Debug, Clone, From)]
+#[derive(PartialEq, Eq, Debug, Clone, From)]
 pub enum AutolykosPowSchemeError {
     /// Scorex-serialization error
     ScorexSerializationError(ScorexSerializationError),
diff --git a/ergo-nipopow/src/nipopow_proof.rs b/ergo-nipopow/src/nipopow_proof.rs
index f5d4048df..5e6ff65a6 100644
--- a/ergo-nipopow/src/nipopow_proof.rs
+++ b/ergo-nipopow/src/nipopow_proof.rs
@@ -185,7 +185,7 @@ impl ScorexSerializable for NipopowProof {
 }
 
 /// `NipopowProof` errors
-#[derive(PartialEq, Debug, Clone, From)]
+#[derive(PartialEq, Eq, Debug, Clone, From)]
 pub enum NipopowProofError {
     /// Errors from `AutolykosPowScheme`
     AutolykosPowSchemeError(autolykos_pow_scheme::AutolykosPowSchemeError),
diff --git a/ergo-p2p/src/peer_connection_handler.rs b/ergo-p2p/src/peer_connection_handler.rs
index ec7935890..ca1e98f01 100644
--- a/ergo-p2p/src/peer_connection_handler.rs
+++ b/ergo-p2p/src/peer_connection_handler.rs
@@ -82,7 +82,7 @@ pub struct HandshakeRequest {
 }
 
 /// Wraps (remoteAddress, localAddress, direction) tuple, which allows to precisely identify peer.
-#[derive(Debug, Copy, Clone, PartialEq)]
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
 pub struct ConnectionId {
     remote_address: PeerAddr,
     // local_address: PeerAddr,
diff --git a/ergo-rest/src/node_info.rs b/ergo-rest/src/node_info.rs
index 3a5d343e4..7e954a8d1 100644
--- a/ergo-rest/src/node_info.rs
+++ b/ergo-rest/src/node_info.rs
@@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize};
 use crate::NodeResponse;
 
 /// Node extended information from /info REST API endpoint
-#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
+#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
 #[repr(C)]
 pub struct NodeInfo {
     /// Node name
diff --git a/ergo-rest/src/peer_info.rs b/ergo-rest/src/peer_info.rs
index d72fef5a2..aa0204aa6 100644
--- a/ergo-rest/src/peer_info.rs
+++ b/ergo-rest/src/peer_info.rs
@@ -2,7 +2,7 @@ use ergo_chain_types::ConnectionDirection;
 use ergo_chain_types::PeerAddr;
 use serde::{de::Error, Deserialize, Deserializer, Serialize};
 
-#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
+#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
 #[repr(C)]
 /// Peer info returned by node REST API
 pub struct PeerInfo {
diff --git a/ergoscript-compiler/src/ast.rs b/ergoscript-compiler/src/ast.rs
index 1ae41321e..f60796a96 100644
--- a/ergoscript-compiler/src/ast.rs
+++ b/ergoscript-compiler/src/ast.rs
@@ -3,7 +3,7 @@ use crate::error::pretty_error_desc;
 use super::syntax::{SyntaxElement, SyntaxKind, SyntaxNode, SyntaxToken};
 use text_size::TextRange;
 
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Eq)]
 pub struct AstError {
     pub msg: String,
     pub span: TextRange,
diff --git a/ergoscript-compiler/src/binder.rs b/ergoscript-compiler/src/binder.rs
index f59033eb8..9c6d46d12 100644
--- a/ergoscript-compiler/src/binder.rs
+++ b/ergoscript-compiler/src/binder.rs
@@ -7,7 +7,7 @@ use crate::hir::ExprKind;
 use crate::hir::GlobalVars;
 use crate::script_env::ScriptEnv;
 
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Eq)]
 pub struct BinderError {
     msg: String,
     span: TextRange,
diff --git a/ergoscript-compiler/src/compiler.rs b/ergoscript-compiler/src/compiler.rs
index 8bb9c411e..5690cd9ad 100644
--- a/ergoscript-compiler/src/compiler.rs
+++ b/ergoscript-compiler/src/compiler.rs
@@ -20,7 +20,7 @@ use ergotree_ir::type_check::TypeCheckError;
 use mir::lower::MirLoweringError;
 
 /// Compilation errors
-#[derive(Debug, PartialEq, From)]
+#[derive(Debug, PartialEq, Eq, From)]
 pub enum CompileError {
     /// Parser error
     ParseError(Vec<ParseError>),
diff --git a/ergoscript-compiler/src/hir.rs b/ergoscript-compiler/src/hir.rs
index 93c122f81..968843a83 100644
--- a/ergoscript-compiler/src/hir.rs
+++ b/ergoscript-compiler/src/hir.rs
@@ -36,7 +36,7 @@ pub struct Expr {
     pub tpe: Option<SType>,
 }
 
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Eq)]
 pub struct HirLoweringError {
     msg: String,
     span: TextRange,
@@ -100,7 +100,7 @@ impl Expr {
     }
 }
 
-#[derive(Debug, PartialEq, Clone)]
+#[derive(Debug, PartialEq, Eq, Clone)]
 pub struct Spanned<T: Clone> {
     pub node: T,
     pub span: TextRange,
@@ -158,7 +158,7 @@ pub enum ExprKind {
     // Lambda
 }
 
-#[derive(Debug, PartialEq, Clone)]
+#[derive(Debug, PartialEq, Eq, Clone)]
 pub enum BinaryOp {
     Plus,
     Minus,
@@ -171,7 +171,7 @@ pub enum BinaryOp {
 //     Neg,
 // }
 
-#[derive(Debug, PartialEq, Clone)]
+#[derive(Debug, PartialEq, Eq, Clone)]
 pub enum GlobalVars {
     Height,
 }
@@ -185,7 +185,7 @@ impl GlobalVars {
     }
 }
 
-#[derive(Debug, PartialEq, Clone)]
+#[derive(Debug, PartialEq, Eq, Clone)]
 pub enum Literal {
     Int(i32),
     Long(i64),
diff --git a/ergoscript-compiler/src/lexer.rs b/ergoscript-compiler/src/lexer.rs
index 69734f3d9..c48651caa 100644
--- a/ergoscript-compiler/src/lexer.rs
+++ b/ergoscript-compiler/src/lexer.rs
@@ -39,7 +39,7 @@ impl<'a> Iterator for Lexer<'a> {
     }
 }
 
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Eq)]
 pub struct Token<'a> {
     pub kind: TokenKind,
     pub text: &'a str,
diff --git a/ergoscript-compiler/src/lexer/token_kind.rs b/ergoscript-compiler/src/lexer/token_kind.rs
index 9602e6608..fe8349b73 100644
--- a/ergoscript-compiler/src/lexer/token_kind.rs
+++ b/ergoscript-compiler/src/lexer/token_kind.rs
@@ -3,7 +3,7 @@
 use logos::Logos;
 use std::fmt;
 
-#[derive(Debug, Copy, Clone, PartialEq, Logos)]
+#[derive(Debug, Copy, Clone, PartialEq, Eq, Logos)]
 pub enum TokenKind {
     #[regex("[ \n]+")]
     Whitespace,
diff --git a/ergoscript-compiler/src/mir/lower.rs b/ergoscript-compiler/src/mir/lower.rs
index 1c31166fa..c4540679d 100644
--- a/ergoscript-compiler/src/mir/lower.rs
+++ b/ergoscript-compiler/src/mir/lower.rs
@@ -10,7 +10,7 @@ use rowan::TextRange;
 use crate::error::pretty_error_desc;
 use crate::hir;
 
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Eq)]
 pub struct MirLoweringError {
     msg: String,
     span: TextRange,
diff --git a/ergoscript-compiler/src/parser/event.rs b/ergoscript-compiler/src/parser/event.rs
index 209414656..9b2ac71bf 100644
--- a/ergoscript-compiler/src/parser/event.rs
+++ b/ergoscript-compiler/src/parser/event.rs
@@ -1,7 +1,7 @@
 use crate::parser::ParseError;
 use crate::syntax::SyntaxKind;
 
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Eq)]
 pub enum Event {
     StartNode {
         kind: SyntaxKind,
diff --git a/ergoscript-compiler/src/parser/parse_error.rs b/ergoscript-compiler/src/parser/parse_error.rs
index 6295a39ff..4bf4d9842 100644
--- a/ergoscript-compiler/src/parser/parse_error.rs
+++ b/ergoscript-compiler/src/parser/parse_error.rs
@@ -4,7 +4,7 @@ use text_size::TextRange;
 use crate::error::pretty_error_desc;
 use crate::lexer::TokenKind;
 
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Eq)]
 pub struct ParseError {
     pub expected: Vec<TokenKind>,
     pub found: Option<TokenKind>,
diff --git a/ergoscript-compiler/src/syntax.rs b/ergoscript-compiler/src/syntax.rs
index cd93308be..81052e321 100644
--- a/ergoscript-compiler/src/syntax.rs
+++ b/ergoscript-compiler/src/syntax.rs
@@ -4,7 +4,7 @@ use super::lexer::TokenKind;
 use num_derive::{FromPrimitive, ToPrimitive};
 use num_traits::{FromPrimitive, ToPrimitive};
 
-#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
+#[derive(Debug, Copy, Clone, PartialEq, Eq, FromPrimitive, ToPrimitive)]
 pub enum SyntaxKind {
     Whitespace,
     FnKw,
diff --git a/ergoscript-compiler/src/type_infer.rs b/ergoscript-compiler/src/type_infer.rs
index 65be0c4e1..dbf0fb41e 100644
--- a/ergoscript-compiler/src/type_infer.rs
+++ b/ergoscript-compiler/src/type_infer.rs
@@ -6,7 +6,7 @@ use crate::hir::Binary;
 use crate::hir::Expr;
 use crate::hir::ExprKind;
 
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Eq)]
 pub struct TypeInferenceError {
     msg: String,
     span: TextRange,
diff --git a/ergotree-interpreter/src/eval.rs b/ergotree-interpreter/src/eval.rs
index cc3f28dd0..de3584299 100644
--- a/ergotree-interpreter/src/eval.rs
+++ b/ergotree-interpreter/src/eval.rs
@@ -156,7 +156,7 @@ pub enum EvalError {
 }
 
 /// Result of expression reduction procedure (see `reduce_to_crypto`).
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct ReductionResult {
     /// value of SigmaProp type which represents a statement verifiable via sigma protocol.
     pub sigma_prop: SigmaBoolean,
diff --git a/ergotree-interpreter/src/sigma_protocol.rs b/ergotree-interpreter/src/sigma_protocol.rs
index 2f1b9f32f..6f4b4a03a 100644
--- a/ergotree-interpreter/src/sigma_protocol.rs
+++ b/ergotree-interpreter/src/sigma_protocol.rs
@@ -42,7 +42,7 @@ pub(crate) trait ProverMessage {
 }
 
 /** First message from the prover (message `a` of `SigmaProtocol`)*/
-#[derive(PartialEq, Debug, Clone, From, TryInto)]
+#[derive(PartialEq, Eq, Debug, Clone, From, TryInto)]
 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
 #[cfg_attr(feature = "json", serde(tag = "type"))]
 #[cfg_attr(feature = "arbitrary", derive(proptest_derive::Arbitrary))]
diff --git a/ergotree-interpreter/src/sigma_protocol/dlog_protocol.rs b/ergotree-interpreter/src/sigma_protocol/dlog_protocol.rs
index 307d8f695..e26064cf6 100644
--- a/ergotree-interpreter/src/sigma_protocol/dlog_protocol.rs
+++ b/ergotree-interpreter/src/sigma_protocol/dlog_protocol.rs
@@ -29,7 +29,7 @@ impl ProverMessage for FirstDlogProverMessage {
 }
 
 /// Second message from the prover (message `z` of `SigmaProtocol`) for discrete logarithm case
-#[derive(PartialEq, Debug, Clone, derive_more::From, derive_more::Into)]
+#[derive(PartialEq, Eq, Debug, Clone, derive_more::From, derive_more::Into)]
 #[cfg_attr(feature = "arbitrary", derive(proptest_derive::Arbitrary))]
 pub struct SecondDlogProverMessage {
     /// message `z`
diff --git a/ergotree-interpreter/src/sigma_protocol/private_input.rs b/ergotree-interpreter/src/sigma_protocol/private_input.rs
index 715f883e0..d5fd6f78d 100644
--- a/ergotree-interpreter/src/sigma_protocol/private_input.rs
+++ b/ergotree-interpreter/src/sigma_protocol/private_input.rs
@@ -18,7 +18,7 @@ use super::crypto_utils;
 use super::wscalar::Wscalar;
 
 /// Secret key of discrete logarithm signature protocol
-#[derive(PartialEq, Clone, derive_more::From)]
+#[derive(PartialEq, Eq, Clone, derive_more::From)]
 pub struct DlogProverInput {
     /// secret key value
     pub w: Wscalar,
@@ -101,7 +101,7 @@ impl DlogProverInput {
 /// Used in a proof that of equality of discrete logarithms (i.e., a proof of a Diffie-Hellman tuple):
 /// given group elements g, h, u, v, the proof convinces a verifier that the prover knows `w` such
 /// that `u = g^w` and `v = h^w`, without revealing `w`
-#[derive(PartialEq, Clone)]
+#[derive(PartialEq, Eq, Clone)]
 pub struct DhTupleProverInput {
     /// Diffie-Hellman tuple's secret
     pub w: Wscalar,
@@ -143,7 +143,7 @@ impl DhTupleProverInput {
 }
 
 /// Private inputs (secrets)
-#[derive(PartialEq, Debug, Clone, From)]
+#[derive(PartialEq, Eq, Debug, Clone, From)]
 pub enum PrivateInput {
     /// Discrete logarithm prover input
     DlogProverInput(DlogProverInput),
diff --git a/ergotree-interpreter/src/sigma_protocol/prover/hint.rs b/ergotree-interpreter/src/sigma_protocol/prover/hint.rs
index 948e53d3e..b0940d28f 100644
--- a/ergotree-interpreter/src/sigma_protocol/prover/hint.rs
+++ b/ergotree-interpreter/src/sigma_protocol/prover/hint.rs
@@ -108,7 +108,7 @@ impl SecretProven {
 /// A hint which contains a commitment to randomness associated with a public image of a secret.
 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
 #[cfg_attr(feature = "arbitrary", derive(proptest_derive::Arbitrary))]
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct RealCommitment {
     ///  image of a secret
     #[cfg_attr(feature = "json", serde(rename = "pubkey"))]
@@ -125,7 +125,7 @@ pub struct RealCommitment {
 /// Please note that this randomness should be kept in secret by the prover.
 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
 #[cfg_attr(feature = "arbitrary", derive(proptest_derive::Arbitrary))]
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct OwnCommitment {
     ///  image of a secret
     #[cfg_attr(feature = "json", serde(rename = "pubkey"))]
@@ -144,7 +144,7 @@ pub struct OwnCommitment {
 ///A hint which contains a commitment to randomness associated with a public image of a secret.
 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
 #[cfg_attr(feature = "arbitrary", derive(proptest_derive::Arbitrary))]
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct SimulatedCommitment {
     /// image of a secret
     #[cfg_attr(feature = "json", serde(rename = "pubkey"))]
@@ -162,7 +162,7 @@ pub struct SimulatedCommitment {
 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
 #[cfg_attr(feature = "json", serde(tag = "hint"))]
 #[cfg_attr(feature = "arbitrary", derive(proptest_derive::Arbitrary))]
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub enum CommitmentHint {
     /// A hint which a commitment to randomness associated with a public image of a secret, as well as randomness itself.
     /// Please note that this randomness should be kept in secret by the prover.
diff --git a/ergotree-interpreter/src/sigma_protocol/unchecked_tree.rs b/ergotree-interpreter/src/sigma_protocol/unchecked_tree.rs
index 75e247a57..08b70749e 100644
--- a/ergotree-interpreter/src/sigma_protocol/unchecked_tree.rs
+++ b/ergotree-interpreter/src/sigma_protocol/unchecked_tree.rs
@@ -69,7 +69,7 @@ impl From<UncheckedTree> for Base16EncodedBytes {
 }
 
 /// Unchecked leaf
-#[derive(PartialEq, Debug, Clone, From)]
+#[derive(PartialEq, Eq, Debug, Clone, From)]
 pub enum UncheckedLeaf {
     /// Unchecked Schnorr
     UncheckedSchnorr(UncheckedSchnorr),
@@ -113,7 +113,7 @@ impl ProofTreeLeaf for UncheckedLeaf {
     }
 }
 /// Unchecked Schnorr
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 #[cfg_attr(feature = "arbitrary", derive(proptest_derive::Arbitrary))]
 pub struct UncheckedSchnorr {
     /// Proposition
@@ -146,7 +146,7 @@ impl From<UncheckedDhTuple> for UncheckedTree {
 }
 
 /// UncheckedDhTuple
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 #[cfg_attr(feature = "arbitrary", derive(proptest_derive::Arbitrary))]
 pub struct UncheckedDhTuple {
     /// Proposition
diff --git a/ergotree-interpreter/src/sigma_protocol/unproven_tree.rs b/ergotree-interpreter/src/sigma_protocol/unproven_tree.rs
index d3a9d045f..9787cdbf7 100644
--- a/ergotree-interpreter/src/sigma_protocol/unproven_tree.rs
+++ b/ergotree-interpreter/src/sigma_protocol/unproven_tree.rs
@@ -324,7 +324,7 @@ impl UnprovenSchnorr {
 }
 
 /// Unproven DhTuple
-#[derive(PartialEq, Debug, Clone)]
+#[derive(PartialEq, Eq, Debug, Clone)]
 pub struct UnprovenDhTuple {
     /// Proposition
     pub proposition: ProveDhTuple,
diff --git a/ergotree-ir/src/serialization/bin_op.rs b/ergotree-ir/src/serialization/bin_op.rs
index e72a9fa54..6f0b040a6 100644
--- a/ergotree-ir/src/serialization/bin_op.rs
+++ b/ergotree-ir/src/serialization/bin_op.rs
@@ -49,7 +49,7 @@ pub fn bin_op_sigma_parse<R: SigmaByteRead>(
         #[allow(clippy::unwrap_used)]
         BinOp {
             kind: op_kind,
-            left: Box::new(Expr::Const((*bools.get(0).unwrap()).into())),
+            left: Box::new(Expr::Const((*bools.first().unwrap()).into())),
             right: Box::new(Expr::Const((*bools.get(1).unwrap()).into())),
         }
         .into()
diff --git a/ergotree-ir/src/type_check.rs b/ergotree-ir/src/type_check.rs
index d68be99b2..53b8bf457 100644
--- a/ergotree-ir/src/type_check.rs
+++ b/ergotree-ir/src/type_check.rs
@@ -3,7 +3,7 @@
 use crate::mir::expr::Expr;
 
 /// Typecheck error
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Eq)]
 pub struct TypeCheckError {
     msg: String,
 }


Test patch: