autocommit 2022-03-29 15:40:59 CEST
This commit is contained in:
parent
6ebf731aea
commit
9842264fad
39 changed files with 121 additions and 92 deletions
|
|
@ -60,7 +60,7 @@ impl<'a> Formatter<'a> {
|
|||
pub fn write_variant(&mut self, variant: &Variant) {
|
||||
let pos = self.buf.len();
|
||||
self.buf.push(0);
|
||||
variant.write_signature(&mut self.buf);
|
||||
variant.write_signature(self.buf);
|
||||
self.buf.push(0);
|
||||
self.buf[pos] = (self.buf.len() - pos - 2) as u8;
|
||||
self.write_variant_body(variant);
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ impl Incoming {
|
|||
self.incoming
|
||||
.fill_msg_buf(remaining as usize, msg_buf)
|
||||
.await?;
|
||||
#[allow(clippy::drop_ref)]
|
||||
drop(msg_buf);
|
||||
let msg_buf = unsafe { msg_buf_data.get().deref().deref() };
|
||||
let headers = &msg_buf[FIXED_HEADER_SIZE..FIXED_HEADER_SIZE + headers_len as usize];
|
||||
|
|
@ -78,7 +79,7 @@ impl Incoming {
|
|||
}
|
||||
let fds: Vec<_> = self.incoming.fds.drain(..unix_fds).collect();
|
||||
let mut parser = Parser {
|
||||
buf: &msg_buf,
|
||||
buf: msg_buf,
|
||||
pos: FIXED_HEADER_SIZE + dyn_header_len as usize,
|
||||
fds: &fds,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ where
|
|||
struct AsyncReplyHandler<T: Message<'static>>(Rc<AsyncReplySlot<T>>);
|
||||
|
||||
impl<T: Message<'static>> AsyncReplyHandler<T> {
|
||||
fn complete(self: Box<Self>, res: Result<Reply<T>, DbusError>) {
|
||||
fn complete(self, res: Result<Reply<T>, DbusError>) {
|
||||
self.0.data.set(Some(res));
|
||||
if let Some(waker) = self.0.waker.take() {
|
||||
waker.wake();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue