From 8973eb8ac42998706662e32e51786e4af2d76b0b Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sun, 20 Aug 2023 00:14:38 -0400 Subject: [PATCH] fmt + deny --- coins/monero/src/tests/address.rs | 12 ++++++++---- coins/monero/src/wallet/scan.rs | 5 ++--- coins/monero/src/wallet/seed/classic.rs | 3 ++- crypto/dalek-ff-group/src/lib.rs | 1 - deny.toml | 2 +- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/coins/monero/src/tests/address.rs b/coins/monero/src/tests/address.rs index 94a7c5e8..2e393f15 100644 --- a/coins/monero/src/tests/address.rs +++ b/coins/monero/src/tests/address.rs @@ -142,10 +142,14 @@ fn featured_vectors() { } _ => panic!("Unknown network"), }; - let spend = - CompressedEdwardsY::from_slice(&hex::decode(vector.spend).unwrap()).unwrap().decompress().unwrap(); - let view = - CompressedEdwardsY::from_slice(&hex::decode(vector.view).unwrap()).unwrap().decompress().unwrap(); + let spend = CompressedEdwardsY::from_slice(&hex::decode(vector.spend).unwrap()) + .unwrap() + .decompress() + .unwrap(); + let view = CompressedEdwardsY::from_slice(&hex::decode(vector.view).unwrap()) + .unwrap() + .decompress() + .unwrap(); let addr = MoneroAddress::from_str(network, &vector.address).unwrap(); assert_eq!(addr.spend, spend); diff --git a/coins/monero/src/wallet/scan.rs b/coins/monero/src/wallet/scan.rs index 6e34b3f7..89954b98 100644 --- a/coins/monero/src/wallet/scan.rs +++ b/coins/monero/src/wallet/scan.rs @@ -385,9 +385,8 @@ impl Scanner { } // P - shared == spend - let subaddress = self - .subaddresses - .get(&(output_key - (&shared_key * ED25519_BASEPOINT_TABLE)).compress()); + let subaddress = + self.subaddresses.get(&(output_key - (&shared_key * ED25519_BASEPOINT_TABLE)).compress()); if subaddress.is_none() { continue; } diff --git a/coins/monero/src/wallet/seed/classic.rs b/coins/monero/src/wallet/seed/classic.rs index 32b0124f..b4b4c83a 100644 --- a/coins/monero/src/wallet/seed/classic.rs +++ b/coins/monero/src/wallet/seed/classic.rs @@ -273,7 +273,8 @@ impl ClassicSeed { } pub fn from_entropy(lang: Language, entropy: Zeroizing<[u8; 32]>) -> Option { - Option::from(Scalar::from_canonical_bytes(*entropy)).map(|scalar| key_to_seed(lang, Zeroizing::new(scalar))) + Option::from(Scalar::from_canonical_bytes(*entropy)) + .map(|scalar| key_to_seed(lang, Zeroizing::new(scalar))) } pub(crate) fn to_string(&self) -> Zeroizing { diff --git a/crypto/dalek-ff-group/src/lib.rs b/crypto/dalek-ff-group/src/lib.rs index 02f4a3de..b7ffe78c 100644 --- a/crypto/dalek-ff-group/src/lib.rs +++ b/crypto/dalek-ff-group/src/lib.rs @@ -1,5 +1,4 @@ #![allow(deprecated)] - #![cfg_attr(docsrs, feature(doc_auto_cfg))] #![no_std] // Prevents writing new code, in what should be a simple wrapper, which requires std #![doc = include_str!("../README.md")] diff --git a/deny.toml b/deny.toml index 6d49d393..77a4ed1d 100644 --- a/deny.toml +++ b/deny.toml @@ -10,7 +10,6 @@ unmaintained = "warn" ignore = [ "RUSTSEC-2020-0071", # https://github.com/chronotope/chrono/issues/602 "RUSTSEC-2021-0139", # https://github.com/serai-dex/serai/228 - "RUSTSEC-2021-0145", # https://github.com/serai-dex/serai/225 "RUSTSEC-2022-0061", # https://github.com/serai-dex/serai/227 ] @@ -92,6 +91,7 @@ unknown-registry = "deny" unknown-git = "deny" allow-registry = ["https://github.com/rust-lang/crates.io-index"] allow-git = [ + "https://github.com/serai-dex/schnorrkel", "https://github.com/serai-dex/substrate-bip39", "https://github.com/serai-dex/substrate", "https://github.com/monero-rs/base58-monero",