Skip to content

Commit

Permalink
Fix unused imports reported by clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
mlafeldt committed Mar 6, 2024
1 parent 6c1c9c4 commit acba34d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 25 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ name = "codebreaker"

[dependencies]
bytemuck = "1"
cfg-if = "1"
num-bigint = "0.4"

[dev-dependencies]
Expand Down
35 changes: 11 additions & 24 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,34 +36,21 @@
#[cfg(doctest)]
doc_comment::doctest!("../README.md", readme);

cfg_if::cfg_if! {
if #[cfg(feature = "std")] {
extern crate std;
mod std_alloc {
pub use std::{
fmt,
string::{String, ToString},
vec,
vec::Vec,
};
}
} else {
extern crate alloc;
mod std_alloc {
pub use alloc::{
fmt,
string::{String, ToString},
vec,
vec::Vec,
};
}
}
}

pub mod cb1;
pub mod cb7;
mod rc4;

#[cfg(test)]
mod std_alloc {
#[cfg(feature = "std")]
extern crate std as alloc;

#[cfg(not(feature = "std"))]
extern crate alloc;

pub use alloc::{fmt, vec, vec::Vec};
}

use cb7::{is_beefcode, Cb7};

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
Expand Down

0 comments on commit acba34d

Please sign in to comment.