Skip to content
Merged
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: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ nom = { version = "6", optional = true }
criterion = "0.3"
futures-executor = "0.3.4"
hex = "0.4"
rand = "0.7"
quickcheck = "0.9"
quickcheck = "1"

[[bench]]
name = "benchmark"
Expand Down
2 changes: 1 addition & 1 deletion src/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub struct UviBytes<T = Bytes> {
varint_codec: Uvi<usize>,
/// number of bytes expected in the current frame (for decoding only)
len: Option<usize>,
// maximum permitted number of bytes per frame
/// maximum permitted number of bytes per frame
max: usize,
_ty: PhantomData<T>
}
Expand Down
4 changes: 2 additions & 2 deletions tests/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ fn various() {
#[test]
fn identity_codec() {
use bytes::{Bytes, BytesMut};
use quickcheck::StdThreadGen;
use quickcheck::Gen;
use tokio_util::codec::{Encoder, Decoder};
use unsigned_varint::codec::UviBytes;

Expand All @@ -118,7 +118,7 @@ fn identity_codec() {
input == codec.decode(&mut buffer).expect("Ok").expect("Some").freeze()
}

QuickCheck::with_gen(StdThreadGen::new(512 * 1024))
QuickCheck::new().gen(Gen::new(512 * 1024))
.quickcheck(prop as fn(Vec<u8>) -> bool)
}

5 changes: 2 additions & 3 deletions tests/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

use quickcheck::{Arbitrary, Gen};
use rand::Rng;
use unsigned_varint::encode;

#[cfg(feature = "std")]
Expand Down Expand Up @@ -107,8 +106,8 @@ impl RandomUvi {
}

impl Arbitrary for RandomUvi {
fn arbitrary<G: Gen>(g: &mut G) -> Self {
let n: u128 = g.gen();
fn arbitrary(g: &mut Gen) -> Self {
let n: u128 = Arbitrary::arbitrary(g);
match n % 6 {
0 => {
let mut b = encode::u8_buffer();
Expand Down