Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #107

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 6.1.0
- Update multiple dependencies

## 6.0.0
- Use LruCache instead of InversionTree for caching data decode matrices
- See [PR #104](https://github.com/rust-rse/reed-solomon-erasure/pull/104)
Expand Down
50 changes: 22 additions & 28 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
[package]
name = "reed-solomon-erasure"
version = "6.0.0"
authors = ["Darren Ldl <[email protected]>"]
edition = "2018"
build = "build.rs"
exclude = [
"appveyor.yml",
".travis.yml"
]

version = "6.1.0"
description = "Rust implementation of Reed-Solomon erasure coding"

documentation = "https://docs.rs/reed-solomon-erasure"
homepage = "https://github.com/darrenldl/reed-solomon-erasure"
repository = "https://github.com/darrenldl/reed-solomon-erasure"

readme = "README.md"

keywords = ["reed-solomon", "erasure"]

categories = ["encoding"]

license = "MIT"
authors = ["Darren Ldl <[email protected]>"]
edition = "2018"
homepage = "https://github.com/darrenldl/reed-solomon-erasure"
repository = "https://github.com/darrenldl/reed-solomon-erasure"
include = [
"/benches",
"/simd_c",
"/src",
"/build.rs",
"/LICENSE",
"/README.md"
]

[features]
default = ["std"] # simd off by default
Expand All @@ -35,25 +30,24 @@ codecov = { repository = "darrenldl/reed-solomon-erasure" }
coveralls = { repository = "darrenldl/reed-solomon-erasure" }

[dependencies]
libc = { version = "0.2", optional = true }
libc = { version = "0.2.138", optional = true }
# `log2()` impl for `no_std`
libm = "0.2.1"
lru = "0.7.8"
libm = "0.2.6"
lru = "0.8.1"
# Efficient `Mutex` implementation for `std` environment
parking_lot = { version = "0.11.2", optional = true }
smallvec = "1.2"
parking_lot = { version = "0.12.1", optional = true }
smallvec = "1.10.0"
# `Mutex` implementation for `no_std` environment with the same high-level API as `parking_lot`
spin = { version = "0.9.2", default-features = false, features = ["spin_mutex"] }
spin = { version = "0.9.4", default-features = false, features = ["spin_mutex"] }

[dev-dependencies]
rand = { version = "0.7.2", features = ["small_rng"] }
quickcheck = "0.9"

rand = { version = "0.8.5", features = ["small_rng"] }
quickcheck = "1.0.3"
# Scientific benchmarking
criterion = { version = "0.4.0", features = ["html_reports"] }

[build-dependencies]
cc = { version = "1.0", optional = true }
cc = { version = "1.0.78", optional = true }

[[bench]]
name = "bandwidth"
Expand Down
3 changes: 2 additions & 1 deletion src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ extern crate alloc;
use alloc::sync::Arc;
use alloc::vec;
use alloc::vec::Vec;
use core::num::NonZeroUsize;

use smallvec::SmallVec;

Expand All @@ -21,7 +22,7 @@ use spin::Mutex;
use super::Field;
use super::ReconstructShard;

const DATA_DECODE_MATRIX_CACHE_CAPACITY: usize = 254;
const DATA_DECODE_MATRIX_CACHE_CAPACITY: NonZeroUsize = unsafe { NonZeroUsize::new_unchecked(254) };

// /// Parameters for parallelism.
// #[derive(PartialEq, Debug, Clone, Copy)]
Expand Down
4 changes: 2 additions & 2 deletions src/galois_16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ impl Element {
#[cfg(test)]
mod tests {
use super::*;
use quickcheck::Arbitrary;
use quickcheck::{Arbitrary, Gen};

impl Arbitrary for Element {
fn arbitrary<G: quickcheck::Gen>(gen: &mut G) -> Self {
fn arbitrary(gen: &mut Gen) -> Self {
let a = u8::arbitrary(gen);
let b = u8::arbitrary(gen);

Expand Down
20 changes: 10 additions & 10 deletions src/tests/galois_16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ quickcheck! {
corrupt_pos_s.push(pos);
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -132,7 +132,7 @@ quickcheck! {
corrupt_pos_s.push(pos);
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -181,7 +181,7 @@ quickcheck! {
corrupt_pos_s.push(pos);
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -244,7 +244,7 @@ quickcheck! {
corrupt_pos_s.push(pos);
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -278,7 +278,7 @@ quickcheck! {
parity -= data + parity - 256;
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -320,7 +320,7 @@ quickcheck! {
parity -= data + parity - 256;
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -351,7 +351,7 @@ quickcheck! {
parity -= data + parity - 256;
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -390,7 +390,7 @@ quickcheck! {
parity -= data + parity - 256;
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -419,7 +419,7 @@ quickcheck! {
parity -= data + parity - 256;
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -463,7 +463,7 @@ quickcheck! {
parity -= data + parity - 256;
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down
32 changes: 16 additions & 16 deletions src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ fn test_too_many_shards() {
fn test_shard_count() {
let mut rng = thread_rng();
for _ in 0..10 {
let data_shard_count = rng.gen_range(1, 128);
let parity_shard_count = rng.gen_range(1, 128);
let data_shard_count = rng.gen_range(1..128);
let parity_shard_count = rng.gen_range(1..128);

let total_shard_count = data_shard_count + parity_shard_count;

Expand Down Expand Up @@ -376,7 +376,7 @@ quickcheck! {
corrupt_pos_s.push(pos);
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -451,7 +451,7 @@ quickcheck! {
corrupt_pos_s.push(pos);
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -500,7 +500,7 @@ quickcheck! {
corrupt_pos_s.push(pos);
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -563,7 +563,7 @@ quickcheck! {
corrupt_pos_s.push(pos);
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -597,7 +597,7 @@ quickcheck! {
parity -= data + parity - 256;
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -639,7 +639,7 @@ quickcheck! {
parity -= data + parity - 256;
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -670,7 +670,7 @@ quickcheck! {
parity -= data + parity - 256;
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -709,7 +709,7 @@ quickcheck! {
parity -= data + parity - 256;
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -738,7 +738,7 @@ quickcheck! {
parity -= data + parity - 256;
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -782,7 +782,7 @@ quickcheck! {
parity -= data + parity - 256;
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let r = ReedSolomon::new(data, parity).unwrap();

Expand Down Expand Up @@ -1235,7 +1235,7 @@ quickcheck! {
parity -= data + parity - 256;
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let reuse = reuse % 10;

Expand Down Expand Up @@ -1285,7 +1285,7 @@ quickcheck! {
parity -= data + parity - 256;
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let reuse = reuse % 10;

Expand Down Expand Up @@ -1398,7 +1398,7 @@ quickcheck! {
parity -= data + parity - 256;
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let reuse = reuse % 10;

Expand Down Expand Up @@ -1457,7 +1457,7 @@ quickcheck! {
parity -= data + parity - 256;
}

let size = 1 + size % 1_000_000;
let size = 1 + size % 50;

let reuse = reuse % 10;

Expand Down