Update to latest std

This commit is contained in:
pjht 2024-08-18 08:39:04 -05:00
parent 27ee9fb7b2
commit 82206ed93d
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E
2 changed files with 3 additions and 3 deletions

View File

@ -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);
} }

View File

@ -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);