Skip to content

Commit

Permalink
add workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Lodder <redmike7@gmail.com>
  • Loading branch information
mikelodder7 committed May 24, 2024
1 parent 32a4f3b commit 0821adf
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
Binary file added .github/workflows/.unknown-order.yml.swp
Binary file not shown.
41 changes: 41 additions & 0 deletions .github/workflows/unknown-order.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: unknown-order

on:
pull_request:
paths-ignore:
- *.md
- *.sh
- LICENSE*
push:
branches: main
paths-ignore:
- *.md
- *.sh
- LICENSE*

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"
RUSTDOCFLAGS: "-Dwarnings"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- run: cargo build --no-default-features --features=rust
- run: cargo build --no-default-features --features=crypto
- run: cargo build --no-default-features --features=openssl
- run: cargo build --no-default-features --features=gmp
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- run: cargo fmt --all -- --check
2 changes: 1 addition & 1 deletion src/rust_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ impl Bn {
let bits = n.0.bits() as usize;
let len_bytes = (bits - 1) / 8 + 1;
let high_bits = len_bytes * 8 - bits;
let mut t = vec![0u8; len_bytes as usize];
let mut t = vec![0u8; len_bytes];
loop {
rng.fill_bytes(&mut t);
if high_bits > 0 {
Expand Down

0 comments on commit 0821adf

Please sign in to comment.