Update to latest std

This commit is contained in:
pjht 2024-08-18 08:37:01 -05:00
parent 326730dfb3
commit 6358f00f08
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E

View File

@ -82,7 +82,7 @@ fn callback(call: IncomingCall) {
let server = server_lock.as_ref().unwrap();
match call.func {
0 => {
let (fd, pos, len) = postcard::from_bytes(&call.args).unwrap();
let (fd, pos, len) = postcard::from_bytes(call.args()).unwrap();
let ret = server.read(fd, pos, len);
let ser_size = postcard::experimental::serialized_size(&ret).unwrap();
let mut buf = call.make_return_buf(ser_size);
@ -90,17 +90,17 @@ fn callback(call: IncomingCall) {
buf.send();
}
1 => {
let (fd, pos, data): (u64, u64, Vec<u8>) = postcard::from_bytes(&call.args).unwrap();
let (fd, pos, data): (u64, u64, Vec<u8>) = postcard::from_bytes(call.args()).unwrap();
let ret = postcard::to_stdvec(&server.write(fd, pos, &data)).unwrap();
call.send_return(&ret);
}
2 => {
let fd = postcard::from_bytes(&call.args).unwrap();
let fd = postcard::from_bytes(call.args()).unwrap();
let ret = postcard::to_stdvec(&server.close(fd)).unwrap();
call.send_return(&ret);
}
3 => {
let fd = postcard::from_bytes(&call.args).unwrap();
let fd = postcard::from_bytes(call.args()).unwrap();
let ret = postcard::to_stdvec(&server.size(fd)).unwrap();
call.send_return(&ret);
}