mirror of
https://codeberg.org/icewind/bitbuffer.git
synced 2026-06-03 16:44:06 +02:00
setup github actions ci
This commit is contained in:
parent
6fc3785fc9
commit
9ddbc51fd7
4 changed files with 65 additions and 4 deletions
64
.github/workflows/ci.yaml
vendored
Normal file
64
.github/workflows/ci.yaml
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
name: Continuous integration
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
name: Check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: check
|
||||||
|
|
||||||
|
test:
|
||||||
|
name: Test Suite
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
|
||||||
|
fmt:
|
||||||
|
name: Rustfmt
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
- run: rustup component add rustfmt
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: fmt
|
||||||
|
args: --all -- --check
|
||||||
|
|
||||||
|
clippy:
|
||||||
|
name: Clippy
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
- run: rustup component add clippy
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: clippy
|
||||||
|
args: -- -D warnings
|
||||||
|
|
@ -7,9 +7,6 @@ description = "Reading bit sequences from a byte slice"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
repository = "https://github.com/icewind1991/bitbuffer"
|
repository = "https://github.com/icewind1991/bitbuffer"
|
||||||
|
|
||||||
[badges]
|
|
||||||
travis-ci = { repository = "icewind1991/bitbuffer" }
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
bitbuffer_derive = { version = "0.7", path = "bitbuffer_derive" }
|
bitbuffer_derive = { version = "0.7", path = "bitbuffer_derive" }
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
[](https://crates.io/crates/bitbuffer)
|
[](https://crates.io/crates/bitbuffer)
|
||||||
[](https://docs.rs/bitbuffer/)
|
[](https://docs.rs/bitbuffer/)
|
||||||
[](https://deps.rs/repo/github/icewind1991/bitbuffer)
|
[](https://deps.rs/repo/github/icewind1991/bitbuffer)
|
||||||
[](https://travis-ci.org/icewind1991/bitbuffer)
|
|
||||||
|
|
||||||
# bitbuffer
|
# bitbuffer
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -539,6 +539,7 @@ impl<E: Endianness, T: BitRead<E>> BitReadSized<E> for Vec<T> {
|
||||||
//}
|
//}
|
||||||
|
|
||||||
/// Read `K` and `T` `size` times and return as `HashMap<K, T>`
|
/// Read `K` and `T` `size` times and return as `HashMap<K, T>`
|
||||||
|
#[allow(clippy::implicit_hasher)]
|
||||||
impl<E: Endianness, K: BitRead<E> + Eq + Hash, T: BitRead<E>> BitReadSized<E> for HashMap<K, T> {
|
impl<E: Endianness, K: BitRead<E> + Eq + Hash, T: BitRead<E>> BitReadSized<E> for HashMap<K, T> {
|
||||||
fn read(stream: &mut BitReadStream<E>, size: usize) -> Result<Self> {
|
fn read(stream: &mut BitReadStream<E>, size: usize) -> Result<Self> {
|
||||||
let mut map = HashMap::with_capacity(min(size, 128));
|
let mut map = HashMap::with_capacity(min(size, 128));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue