Skip to content

Commit

Permalink
make cargo clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
piniom committed Mar 18, 2024
1 parent 410fae6 commit a46f3d0
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 13 deletions.
9 changes: 6 additions & 3 deletions crates/account_sdk/src/felt_ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,10 @@ impl<'a> ser::Serializer for &'a mut Serializer {
Err(Error::TypeNotSupported)
}

fn serialize_some<T: ?Sized>(self, value: &T) -> Result<()>
fn serialize_some<T>(self, value: &T) -> Result<()>
where
T: Serialize,
T: ?Sized,
{
Err(Error::TypeNotSupported)
}
Expand All @@ -153,14 +154,15 @@ impl<'a> ser::Serializer for &'a mut Serializer {
Err(Error::TypeNotSupported)
}

fn serialize_newtype_struct<T: ?Sized>(self, name: &'static str, value: &T) -> Result<()>
fn serialize_newtype_struct<T>(self, name: &'static str, value: &T) -> Result<()>
where
T: Serialize,
T: ?Sized,
{
value.serialize(self)
}

fn serialize_newtype_variant<T: ?Sized>(
fn serialize_newtype_variant<T>(
self,
name: &'static str,
variant_index: u32,
Expand All @@ -169,6 +171,7 @@ impl<'a> ser::Serializer for &'a mut Serializer {
) -> Result<()>
where
T: Serialize,
T: ?Sized,
{
Err(Error::TypeNotSupported)
}
Expand Down
1 change: 1 addition & 0 deletions crates/webauthn/tests/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ fn main() {
// It's important since we always want to test against the latest version of the code
println!("cargo:rerun-if-changed=../auth");
println!("cargo:rerun-if-changed=../session");
println!("cargo:rerun-if-changed=../../Scarb.toml");
}
2 changes: 0 additions & 2 deletions crates/webauthn/tests/src/auth/expand_auth_data.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use cairo_args_runner::{errors::SierraRunnerError, Arg, Felt252};
use proptest::{collection, prelude::*};

use crate::prelude::*;
use cairo_args_runner::SuccessfulRun;

struct AuthDataParser;
impl ArgumentParser for AuthDataParser {
Expand Down
2 changes: 0 additions & 2 deletions crates/webauthn/tests/src/auth/helpers.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use super::*;
use crate::*;
use cairo_args_runner::SuccessfulRun;
use cairo_args_runner::{errors::SierraRunnerError, Arg, Felt252};

struct U256ArrParser;

Expand Down
2 changes: 0 additions & 2 deletions crates/webauthn/tests/src/auth/mod_arithmetic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use cairo_args_runner::{Arg, Felt252};

use crate::prelude::*;

/// ```extended_gcd(u256, u256) -> (u256, u256, u256)```
Expand Down
1 change: 0 additions & 1 deletion crates/webauthn/tests/src/auth/verify_ecdsa.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use account_sdk::webauthn_signer::P256VerifyingKeyConverter;
use cairo_args_runner::Felt252;
use p256::{
ecdsa::{signature::Signer, Signature, SigningKey},
elliptic_curve::{rand_core::OsRng, SecretKey},
Expand Down
1 change: 0 additions & 1 deletion crates/webauthn/tests/src/auth/verify_signature.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use account_sdk::webauthn_signer::P256VerifyingKeyConverter;
use cairo_args_runner::Felt252;
use p256::{
ecdsa::{signature::Signer, Signature, SigningKey},
elliptic_curve::rand_core::OsRng,
Expand Down
1 change: 0 additions & 1 deletion crates/webauthn/tests/src/prop_utils.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use cairo_args_runner::Felt252;
use proptest::prelude::*;
use proptest::strategy::Strategy;

#[derive(Debug, Clone, Copy)]
pub struct Felt252Strategy;
Expand Down
1 change: 0 additions & 1 deletion crates/webauthn/tests/src/session/prop_signature_proofs.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use cairo_args_runner::Felt252;
use proptest::prelude::*;
use proptest::strategy::Strategy;

use crate::prop_utils::Felt252Strategy;
use crate::session::signature_proofs::SIGNATURE_PROOFS;
Expand Down

0 comments on commit a46f3d0

Please sign in to comment.