Correct no-std builds for monero-clsag and monero-bulletproofs

This commit is contained in:
Luke Parker
2024-06-15 17:06:54 -04:00
parent f7c13fd1ca
commit d9107b53a6
9 changed files with 10 additions and 8 deletions

View File

@@ -1,3 +1,5 @@
use std_shims::{vec, vec::Vec};
use curve25519_dalek::{ use curve25519_dalek::{
constants::ED25519_BASEPOINT_POINT, constants::ED25519_BASEPOINT_POINT,
traits::{IsIdentity, VartimeMultiscalarMul}, traits::{IsIdentity, VartimeMultiscalarMul},

View File

@@ -1,4 +1,4 @@
use std_shims::{vec::Vec, sync::OnceLock}; use std_shims::{vec, vec::Vec, sync::OnceLock};
use rand_core::{RngCore, CryptoRng}; use rand_core::{RngCore, CryptoRng};
use subtle::{Choice, ConditionallySelectable}; use subtle::{Choice, ConditionallySelectable};

View File

@@ -4,7 +4,7 @@
#![allow(non_snake_case)] #![allow(non_snake_case)]
use std_shims::{ use std_shims::{
vec::Vec, vec, vec::Vec,
io::{self, Read, Write}, io::{self, Read, Write},
}; };

View File

@@ -1,4 +1,4 @@
use std_shims::{vec::Vec, sync::OnceLock}; use std_shims::{vec, vec::Vec, sync::OnceLock};
use rand_core::{RngCore, CryptoRng}; use rand_core::{RngCore, CryptoRng};
use zeroize::Zeroize; use zeroize::Zeroize;

View File

@@ -1,4 +1,4 @@
use std_shims::vec::Vec; use std_shims::{vec, vec::Vec};
use rand_core::{RngCore, CryptoRng}; use rand_core::{RngCore, CryptoRng};
use zeroize::{Zeroize, ZeroizeOnDrop, Zeroizing}; use zeroize::{Zeroize, ZeroizeOnDrop, Zeroizing};

View File

@@ -1,4 +1,4 @@
use std_shims::vec::Vec; use std_shims::{vec, vec::Vec};
use rand_core::{RngCore, CryptoRng}; use rand_core::{RngCore, CryptoRng};
use zeroize::{Zeroize, ZeroizeOnDrop}; use zeroize::{Zeroize, ZeroizeOnDrop};

View File

@@ -2,7 +2,7 @@ use core::{
borrow::Borrow, borrow::Borrow,
ops::{Index, IndexMut, Add, Sub, Mul}, ops::{Index, IndexMut, Add, Sub, Mul},
}; };
use std_shims::vec::Vec; use std_shims::{vec, vec::Vec};
use zeroize::{Zeroize, ZeroizeOnDrop}; use zeroize::{Zeroize, ZeroizeOnDrop};

View File

@@ -5,7 +5,7 @@
use core::ops::Deref; use core::ops::Deref;
use std_shims::{ use std_shims::{
vec::Vec, vec, vec::Vec,
io::{self, Read, Write}, io::{self, Read, Write},
}; };

View File

@@ -190,7 +190,7 @@ fn prepare_inputs(
// We now need to sort the inputs by their key image // We now need to sort the inputs by their key image
// We take the transaction's inputs, temporarily // We take the transaction's inputs, temporarily
let mut tx_inputs = Vec::with_capacity(inputs.len()); let mut tx_inputs = Vec::with_capacity(inputs.len());
std::mem::swap(&mut tx_inputs, &mut tx.prefix.inputs); core::mem::swap(&mut tx_inputs, &mut tx.prefix.inputs);
// Then we join them with their signable contexts // Then we join them with their signable contexts
let mut joint = tx_inputs.into_iter().zip(signable).collect::<Vec<_>>(); let mut joint = tx_inputs.into_iter().zip(signable).collect::<Vec<_>>();