Skip to content

Commit

Permalink
Merge pull request #93 from koute/master
Browse files Browse the repository at this point in the history
Fix compilation on `no_std`
  • Loading branch information
burdges authored Sep 12, 2023
2 parents 9ff4845 + c4b8d6c commit b1baba0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- run: cargo test

build:
name: Build (no_std)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --no-default-features
- run: cargo build --no-default-features --features alloc

clippy:
name: Check that clippy is happy
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "schnorrkel"
version = "0.11.1"
version = "0.11.2"
authors = ["Jeff Burdges <jeff@web3.foundation>"]
readme = "README.md"
license = "BSD-3-Clause"
Expand Down
2 changes: 1 addition & 1 deletion src/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ impl PreparedBatch{


pub fn reserve_mut<'heap, T>(heap: &mut &'heap mut [T], len: usize) -> &'heap mut [T] {
let tmp: &'heap mut [T] = std::mem::take(&mut *heap);
let tmp: &'heap mut [T] = core::mem::take(&mut *heap);
let (reserved, tmp) = tmp.split_at_mut(len);
*heap = tmp;
reserved
Expand Down

0 comments on commit b1baba0

Please sign in to comment.