From 8250dca8be190c3e200d297fbe45e240247ec53a Mon Sep 17 00:00:00 2001 From: aniampio Date: Fri, 22 Oct 2021 17:59:53 +0200 Subject: [PATCH] Fix warnings from clippy --- common/credentials/src/bandwidth.rs | 4 ++-- common/credentials/src/utils.rs | 2 -- common/nymcoconut/src/lib.rs | 5 ----- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/common/credentials/src/bandwidth.rs b/common/credentials/src/bandwidth.rs index aadafed65e..dbd7eb408c 100644 --- a/common/credentials/src/bandwidth.rs +++ b/common/credentials/src/bandwidth.rs @@ -9,7 +9,7 @@ use url::Url; use coconut_interface::{ - Attribute, Credential, Parameters, PrivateAttribute, PublicAttribute, + Credential, Parameters, PrivateAttribute, PublicAttribute, Signature, VerificationKey, }; @@ -75,7 +75,7 @@ pub fn prepare_for_spending( attributes: &BandwidthVoucherAttributes, verification_key: &VerificationKey, ) -> Result { - let public_attributes = vec![BANDWIDTH_VALUE.to_be_bytes().to_vec()]; + let public_attributes = vec![raw_identity.to_vec(), BANDWIDTH_VALUE.to_be_bytes().to_vec()]; let params = Parameters::new(TOTAL_ATTRIBUTES)?; diff --git a/common/credentials/src/utils.rs b/common/credentials/src/utils.rs index 7bc1c4d992..d951d46c3b 100644 --- a/common/credentials/src/utils.rs +++ b/common/credentials/src/utils.rs @@ -1,8 +1,6 @@ // Copyright 2021 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 -use std::borrow::Borrow; - use url::Url; use coconut_interface::{ diff --git a/common/nymcoconut/src/lib.rs b/common/nymcoconut/src/lib.rs index d59639b345..2aafc5bc14 100644 --- a/common/nymcoconut/src/lib.rs +++ b/common/nymcoconut/src/lib.rs @@ -56,11 +56,6 @@ pub type Attribute = Scalar; pub type PrivateAttribute = Attribute; pub type PublicAttribute = Attribute; -pub struct BandwidthPrivateAttributes { - serial_number: Attribute, - binding_number: Attribute, -} - impl Bytable for Attribute { fn to_byte_vec(&self) -> Vec { self.to_bytes().to_vec()