Skip to content

Commit b6f8162

Browse files
committed
chore: Update crates to recent versions
1 parent f3de98a commit b6f8162

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

rockusb/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ libusb = ["dep:rusb"]
1717
[dependencies]
1818
bytes = "1.4.0"
1919
crc = "3.0.1"
20-
fastrand = "1.9.0"
21-
num_enum = "0.5.9"
20+
fastrand = "2"
21+
num_enum = "0.7"
2222
thiserror = "1.0.38"
2323
rusb = { version = "0.9.1", optional = true }
2424

2525
[dev-dependencies]
2626
anyhow = "1.0.69"
27-
bmap-parser = "0.1.0"
27+
bmap-parser = "0.2.0"
2828
clap = { version = "4.2", features = ["derive"] }
2929
clap-num = "1.0"
3030
flate2 = "1.0.25"
31-
nbd = "0.2.3"
31+
nbd = "0.3"
3232
rockfile = { path = "../rockfile", version = "0.1.1" }
3333
rusb = "0.9.1"
3434

rockusb/examples/rockusb.rs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,19 @@ fn run_nbd(transport: Transport) -> Result<()> {
187187

188188
let io = transport.into_io()?;
189189

190-
let export = nbd::Export {
191-
size: io.size(),
192-
readonly: false,
193-
..Default::default()
194-
};
195-
196190
println!("Connection!");
197191

198-
nbd::server::handshake(&mut stream, &export)?;
192+
nbd::server::handshake(&mut stream, |_s| {
193+
Ok(nbd::Export {
194+
size: io.size(),
195+
readonly: false,
196+
resizeable: false,
197+
rotational: false,
198+
send_trim: false,
199+
send_flush: true,
200+
data: (),
201+
})
202+
})?;
199203
println!("Shook hands!");
200204
nbd::server::transmission(&mut stream, io)?;
201205
println!("nbd client disconnected");

0 commit comments

Comments
 (0)