Update to latest std
This commit is contained in:
parent
326730dfb3
commit
6358f00f08
@ -82,7 +82,7 @@ fn callback(call: IncomingCall) {
|
|||||||
let server = server_lock.as_ref().unwrap();
|
let server = server_lock.as_ref().unwrap();
|
||||||
match call.func {
|
match call.func {
|
||||||
0 => {
|
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 ret = server.read(fd, pos, len);
|
||||||
let ser_size = postcard::experimental::serialized_size(&ret).unwrap();
|
let ser_size = postcard::experimental::serialized_size(&ret).unwrap();
|
||||||
let mut buf = call.make_return_buf(ser_size);
|
let mut buf = call.make_return_buf(ser_size);
|
||||||
@ -90,17 +90,17 @@ fn callback(call: IncomingCall) {
|
|||||||
buf.send();
|
buf.send();
|
||||||
}
|
}
|
||||||
1 => {
|
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();
|
let ret = postcard::to_stdvec(&server.write(fd, pos, &data)).unwrap();
|
||||||
call.send_return(&ret);
|
call.send_return(&ret);
|
||||||
}
|
}
|
||||||
2 => {
|
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();
|
let ret = postcard::to_stdvec(&server.close(fd)).unwrap();
|
||||||
call.send_return(&ret);
|
call.send_return(&ret);
|
||||||
}
|
}
|
||||||
3 => {
|
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();
|
let ret = postcard::to_stdvec(&server.size(fd)).unwrap();
|
||||||
call.send_return(&ret);
|
call.send_return(&ret);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user