Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Boog900 committed Jun 18, 2024
1 parent 4e24409 commit 205493c
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/hack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ jobs:

- name: Install dependencies
run: cargo install cargo-hack --locked
- name: Deny
run: cargo deny check
- name: Hack Check
# TODO: remove the exclude when `cuprate-blockchain` errors are fixed
run: argo hack --workspace --exclude cuprate-blockchain check --feature-powerset --no-dev-deps
2 changes: 1 addition & 1 deletion helper/src/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use crossbeam::atomic::AtomicCell;

#[allow(unused_imports)] // docs
use std::sync::atomic::{Ordering, Ordering::Acquire, Ordering::Release};
use core::sync::atomic::{Ordering, Ordering::Acquire, Ordering::Release};

//---------------------------------------------------------------------------------------------------- Atomic Float
/// Compile-time assertion that our floats are
Expand Down
2 changes: 1 addition & 1 deletion helper/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub mod atomic;
#[cfg(feature = "constants")]
pub mod constants;

#[cfg(feature = "fs")]
#[cfg(all(feature = "fs", feature = "std"))]
pub mod fs;

pub mod network;
Expand Down
4 changes: 3 additions & 1 deletion net/epee-encoding/src/container_as_blob.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use alloc::{string::ToString, vec, vec::Vec};

use bytes::{Buf, BufMut, Bytes, BytesMut};
use ref_cast::RefCast;
use sealed::sealed;
Expand Down Expand Up @@ -72,7 +74,7 @@ pub trait Containerable {
macro_rules! int_container_able {
($int:ty ) => {
impl Containerable for $int {
const SIZE: usize = std::mem::size_of::<$int>();
const SIZE: usize = core::mem::size_of::<$int>();

fn from_bytes(bytes: &[u8]) -> Self {
<$int>::from_le_bytes(bytes.try_into().unwrap())
Expand Down
1 change: 1 addition & 0 deletions net/epee-encoding/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use alloc::string::{String, ToString};
use core::{
fmt::{Debug, Formatter},
num::TryFromIntError,
Expand Down
1 change: 1 addition & 0 deletions net/epee-encoding/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@

extern crate alloc;

use alloc::string::ToString;
use core::{ops::Deref, str::from_utf8 as str_from_utf8};

use bytes::{Buf, BufMut, Bytes, BytesMut};
Expand Down
6 changes: 3 additions & 3 deletions net/epee-encoding/src/value.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use alloc::{string::String, vec::Vec};
/// This module contains a `sealed` [`EpeeValue`] trait and different impls for
/// the different possible base epee values.
//! This module contains a `sealed` [`EpeeValue`] trait and different impls for
//! the different possible base epee values.
use alloc::{string::String, vec, vec::Vec};
use core::fmt::Debug;

use bytes::{Buf, BufMut, Bytes, BytesMut};
Expand Down
2 changes: 1 addition & 1 deletion p2p/monero-p2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cuprate-helper = { path = "../../helper" }
monero-wire = { path = "../../net/monero-wire", features = ["tracing"] }
monero-pruning = { path = "../../pruning" }

tokio = { workspace = true, features = ["net", "sync", "macros", "time"]}
tokio = { workspace = true, features = ["net", "sync", "macros", "time", "rt"]}
tokio-util = { workspace = true, features = ["codec"] }
tokio-stream = { workspace = true, features = ["sync"]}
futures = { workspace = true, features = ["std"] }
Expand Down

0 comments on commit 205493c

Please sign in to comment.