Skip to content

Commit eb84ef9

Browse files
committed
Upgrade dependencies
1 parent 5f1df99 commit eb84ef9

File tree

2 files changed

+21
-24
lines changed

2 files changed

+21
-24
lines changed

Cargo.toml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,30 @@ exclude = [".github", "rfcs"]
1414
repository = "https://github.com/oblique/async-tftp-rs"
1515

1616
[dependencies]
17-
bytes = "1.5.0"
18-
log = "0.4.20"
19-
thiserror = "1.0.48"
17+
bytes = "1.10.1"
18+
log = "0.4.28"
19+
thiserror = "1.0.69"
2020

21-
async-executor = "1.5.1"
22-
async-io = "1.13.0"
23-
async-lock = "2.8.0"
24-
blocking = "1.3.1"
25-
futures-lite = "1.13.0"
21+
async-executor = "1.13.3"
22+
async-io = "2.6.0"
23+
async-lock = "3.4.1"
24+
blocking = "1.6.2"
25+
futures-lite = "2.6.1"
2626

2727
[dev-dependencies]
28-
anyhow = "1.0.75"
29-
async-channel = "1.9.0"
30-
fern = "0.6.2"
31-
md5 = "0.7.0"
32-
rand = { version = "0.8.5", features = ["small_rng"] }
28+
anyhow = "1.0.100"
29+
async-channel = "2.5.0"
30+
fern = "0.7.1"
31+
md5 = "0.8.0"
32+
rand = "0.9.2"
3333
structopt = "0.3.26"
34-
tempfile = "3.8.0"
35-
tokio = { version = "1.32.0", features = ["rt-multi-thread", "macros"] }
34+
tempfile = "3.23.0"
35+
tokio = { version = "1.48.0", features = ["rt-multi-thread", "macros"] }
3636

3737
# deps for tftpd-targz.rs
38-
async-compression = { version = "0.4.3", features = ["gzip", "futures-io"] }
39-
async-std = { version = "1.12.0", features = ["unstable"] }
40-
async-tar = "0.4.2"
38+
async-compression = { version = "0.4.32", features = ["gzip", "futures-io"] }
39+
async-std = { version = "1.13.2", features = ["unstable"] }
40+
async-tar = "0.5.1"
4141

4242
[features]
4343
external-client-tests = []

src/tests/random_file.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33

44
use async_channel::Sender;
55
use futures_lite::AsyncRead;
6-
use rand::rngs::SmallRng;
7-
use rand::{RngCore, SeedableRng};
6+
use rand::RngCore;
87
use std::cmp;
98
use std::io::{self, Read};
109
use std::pin::Pin;
@@ -13,7 +12,6 @@ use std::task::{Context, Poll};
1312
pub struct RandomFile {
1413
size: usize,
1514
read_size: usize,
16-
rng: SmallRng,
1715
md5_ctx: Option<md5::Context>,
1816
md5_tx: Option<Sender<md5::Digest>>,
1917
}
@@ -23,7 +21,6 @@ impl RandomFile {
2321
RandomFile {
2422
size,
2523
read_size: 0,
26-
rng: SmallRng::from_entropy(),
2724
md5_ctx: Some(md5::Context::new()),
2825
md5_tx: Some(md5_tx),
2926
}
@@ -37,15 +34,15 @@ impl Read for RandomFile {
3734
(self.md5_ctx.take(), self.md5_tx.take())
3835
{
3936
md5_tx
40-
.try_send(md5_ctx.compute())
37+
.try_send(md5_ctx.finalize())
4138
.expect("failed to send md5 digest");
4239
}
4340

4441
Ok(0)
4542
} else {
4643
let len = cmp::min(buf.len(), self.size - self.read_size);
4744

48-
self.rng.fill_bytes(&mut buf[..len]);
45+
rand::rng().fill_bytes(&mut buf[..len]);
4946
self.md5_ctx.as_mut().unwrap().consume(&buf[..len]);
5047
self.read_size += len;
5148

0 commit comments

Comments
 (0)