Skip to content

Commit

Permalink
Correct imports for no-std
Browse files Browse the repository at this point in the history
  • Loading branch information
kayabaNerve committed Jul 4, 2024
1 parent da2ab12 commit 849296a
Show file tree
Hide file tree
Showing 17 changed files with 29 additions and 8 deletions.
2 changes: 1 addition & 1 deletion coins/monero/ringct/bulletproofs/src/plus/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![allow(non_snake_case)]

use std_shims::sync::OnceLock;
use std_shims::{sync::OnceLock, vec};

use curve25519_dalek::{constants::ED25519_BASEPOINT_POINT, scalar::Scalar, edwards::EdwardsPoint};

Expand Down
1 change: 1 addition & 0 deletions coins/monero/ringct/mlsag/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#![allow(non_snake_case)]

use std_shims::{
vec,
vec::Vec,
io::{self, Read, Write},
};
Expand Down
4 changes: 2 additions & 2 deletions coins/monero/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#![cfg_attr(not(feature = "std"), no_std)]

use core::fmt::Debug;
#[cfg(not(feature = "std"))]
use alloc::boxed::Box;
use std_shims::{
alloc::{boxed::Box, format},
vec,
vec::Vec,
io,
string::{String, ToString},
Expand Down
1 change: 1 addition & 0 deletions coins/monero/src/block.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std_shims::{
vec,
vec::Vec,
io::{self, Read, Write},
};
Expand Down
1 change: 1 addition & 0 deletions coins/monero/src/ringct.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std_shims::{
vec,
vec::Vec,
io::{self, Read, Write},
};
Expand Down
1 change: 1 addition & 0 deletions coins/monero/src/transaction.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use core::cmp::Ordering;
use std_shims::{
vec,
vec::Vec,
io::{self, Read, Write},
};
Expand Down
2 changes: 2 additions & 0 deletions coins/monero/wallet/address/src/base58check.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std_shims::{vec::Vec, string::String};

use monero_primitives::keccak256;

const ALPHABET_LEN: u64 = 58;
Expand Down
5 changes: 4 additions & 1 deletion coins/monero/wallet/address/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
#![cfg_attr(not(feature = "std"), no_std)]

use core::fmt::{self, Write};
use std_shims::string::ToString;
use std_shims::{
vec,
string::{String, ToString},
};

use zeroize::Zeroize;

Expand Down
1 change: 1 addition & 0 deletions coins/monero/wallet/seed/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use core::{ops::Deref, fmt};
use std_shims::{
sync::OnceLock,
vec,
vec::Vec,
string::{String, ToString},
collections::HashMap,
Expand Down
1 change: 1 addition & 0 deletions coins/monero/wallet/src/extra.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use core::ops::BitXor;
use std_shims::{
vec,
vec::Vec,
io::{self, Read, BufRead, Write},
};
Expand Down
2 changes: 2 additions & 0 deletions coins/monero/wallet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#![deny(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]

use std_shims::vec::Vec;

use zeroize::{Zeroize, Zeroizing};

use curve25519_dalek::{Scalar, EdwardsPoint};
Expand Down
3 changes: 2 additions & 1 deletion coins/monero/wallet/src/output.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std_shims::{
io::{self, Read, Write},
vec,
vec::Vec,
io::{self, Read, Write},
};

use zeroize::{Zeroize, ZeroizeOnDrop};
Expand Down
2 changes: 1 addition & 1 deletion coins/monero/wallet/src/scan.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use core::ops::Deref;
use std_shims::{vec::Vec, string::ToString, collections::HashMap};
use std_shims::{alloc::format, vec, vec::Vec, string::ToString, collections::HashMap};

use zeroize::{Zeroize, ZeroizeOnDrop, Zeroizing};

Expand Down
2 changes: 1 addition & 1 deletion coins/monero/wallet/src/send/eventuality.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std_shims::io;
use std_shims::{vec::Vec, io};

use zeroize::Zeroize;

Expand Down
6 changes: 5 additions & 1 deletion coins/monero/wallet/src/send/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
use core::{ops::Deref, fmt};
use std_shims::io;
use std_shims::{
io, vec,
vec::Vec,
string::{String, ToString},
};

use zeroize::{Zeroize, Zeroizing};

Expand Down
2 changes: 2 additions & 0 deletions coins/monero/wallet/src/send/tx.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std_shims::{vec, vec::Vec};

use rand_core::SeedableRng;
use rand_chacha::ChaCha20Rng;

Expand Down
1 change: 1 addition & 0 deletions coins/monero/wallet/src/send/tx_keys.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use core::ops::Deref;
use std_shims::{vec, vec::Vec};

use zeroize::Zeroizing;

Expand Down

0 comments on commit 849296a

Please sign in to comment.