Update to latest std
This commit is contained in:
parent
27ee9fb7b2
commit
82206ed93d
@ -11,7 +11,7 @@ pub fn send_syslog_msg(msg: syslog_structs::Message, dest: u64) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn callback(msg: ipc::Message) {
|
fn callback(msg: ipc::Message) {
|
||||||
let msg: syslog_structs::Message = postcard::from_bytes(msg.data.as_slice()).unwrap();
|
let msg: syslog_structs::Message = postcard::from_bytes(msg.data()).unwrap();
|
||||||
let mut msg_buf = MSG_BUF.lock();
|
let mut msg_buf = MSG_BUF.lock();
|
||||||
msg_buf.push_back(msg);
|
msg_buf.push_back(msg);
|
||||||
}
|
}
|
||||||
|
@ -89,14 +89,14 @@ fn callback(call: IncomingCall) {
|
|||||||
let server_lock = SERVER.read();
|
let server_lock = SERVER.read();
|
||||||
let server = server_lock.as_ref().unwrap();
|
let server = server_lock.as_ref().unwrap();
|
||||||
if call.func == 0 {
|
if call.func == 0 {
|
||||||
let message = postcard::from_bytes(&call.args).unwrap();
|
let message = postcard::from_bytes(call.args()).unwrap();
|
||||||
let ret = postcard::to_stdvec(&server.send_message(message)).unwrap();
|
let ret = postcard::to_stdvec(&server.send_message(message)).unwrap();
|
||||||
call.send_return(&ret);
|
call.send_return(&ret);
|
||||||
} else if call.func == 1 {
|
} else if call.func == 1 {
|
||||||
let ret = postcard::to_stdvec(&server.subscribe_to_text(call.from)).unwrap();
|
let ret = postcard::to_stdvec(&server.subscribe_to_text(call.from)).unwrap();
|
||||||
call.send_return(&ret);
|
call.send_return(&ret);
|
||||||
} else if call.func == 2 {
|
} else if call.func == 2 {
|
||||||
let (message_from, kinds) = postcard::from_bytes(&call.args).unwrap();
|
let (message_from, kinds) = postcard::from_bytes(call.args()).unwrap();
|
||||||
let ret = postcard::to_stdvec(&server.subscribe_to_binary(call.from, message_from, kinds))
|
let ret = postcard::to_stdvec(&server.subscribe_to_binary(call.from, message_from, kinds))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
call.send_return(&ret);
|
call.send_return(&ret);
|
||||||
|
Loading…
Reference in New Issue
Block a user