diff --git a/syslog_msg_ipc/src/lib.rs b/syslog_msg_ipc/src/lib.rs index df636db..acfbbca 100644 --- a/syslog_msg_ipc/src/lib.rs +++ b/syslog_msg_ipc/src/lib.rs @@ -11,7 +11,7 @@ pub fn send_syslog_msg(msg: syslog_structs::Message, dest: u64) { } 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(); msg_buf.push_back(msg); } diff --git a/syslog_rpc/src/lib.rs b/syslog_rpc/src/lib.rs index 8422ce6..337e898 100644 --- a/syslog_rpc/src/lib.rs +++ b/syslog_rpc/src/lib.rs @@ -89,14 +89,14 @@ fn callback(call: IncomingCall) { let server_lock = SERVER.read(); let server = server_lock.as_ref().unwrap(); 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(); call.send_return(&ret); } else if call.func == 1 { let ret = postcard::to_stdvec(&server.subscribe_to_text(call.from)).unwrap(); call.send_return(&ret); } 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)) .unwrap(); call.send_return(&ret);