Skip to content

Commit daec357

Browse files
committed
Fix no_std build
1 parent df7479e commit daec357

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
precommit:
22
cargo fmt --all -- --config format_code_in_doc_comments=true
3-
cargo clippy --all && cargo clippy --all --no-default-features
4-
cargo test --all && cargo test --all --no-default-features
3+
cargo clippy -p negentropy && cargo clippy -p negentropy --no-default-features
4+
cargo test -p negentropy && cargo test -p negentropy --no-default-features
55

66
bench:
77
RUSTFLAGS='--cfg=bench' cargo +nightly bench -p negentropy

negentropy/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ extern crate std;
1818
#[cfg(not(feature = "std"))]
1919
use alloc::collections::BTreeSet;
2020
use alloc::collections::VecDeque;
21+
use alloc::string::String;
2122
use alloc::vec;
2223
use alloc::vec::Vec;
2324
use core::cmp::Ordering;

negentropy/src/sha256.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) 2023 Yuki Kishimoto
22
// Distributed under the MIT software license
33

4+
use alloc::vec::Vec;
5+
46
const K: [u32; 64] = [
57
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
68
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,

0 commit comments

Comments
 (0)