Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Update some dependencies #136

Open
wants to merge 1 commit 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
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ lazy_static = { version = "1.2.0", optional = true }
log = "0.4"
mime = "0.3.14"
mime_guess = "2.0.1"
rand = "0.7"
rand = "0.8"
safemem = { version = "0.3", optional = true }
tempfile = "3"
clippy = { version = ">=0.0, <0.1", optional = true}
Expand All @@ -36,14 +36,14 @@ quick-error = { version = "1.2", optional = true }
# Optional Integrations
hyper = { version = ">=0.9, <0.11", optional = true, default-features = false }
iron = { version = ">=0.4,<0.7", optional = true }
tiny_http = { version = "0.6", optional = true }
tiny_http = { version = "0.8", optional = true }
nickel = { version = ">=0.10.1", optional = true }

# Only for Rocket example but dev-dependencies can't be optional
rocket = { version = "0.4", optional = true }

[dev-dependencies]
env_logger = "0.5"
env_logger = "0.8"

[features]
client = []
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ fn random_alphanumeric(len: usize) -> String {
rand::thread_rng()
.sample_iter(&rand::distributions::Alphanumeric)
.take(len)
.map(|ch| ch as char)
.collect()
}

Expand Down
4 changes: 2 additions & 2 deletions src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl Write for HttpBuffer {
}

// Simulate the randomness of a network connection by not always reading everything
let len = self.rng.gen_range(1, buf.len() + 1);
let len = self.rng.gen_range(1..=buf.len());

self.buf.write(&buf[..len])
}
Expand Down Expand Up @@ -159,7 +159,7 @@ impl<'a> Read for ServerRequest<'a> {
}

// Simulate the randomness of a network connection by not always reading everything
let len = self.rng.gen_range(1, out.len() + 1);
let len = self.rng.gen_range(1..=out.len());
self.data.read(&mut out[..len])
}
}
Expand Down