Skip to content

Commit 1b014ce

Browse files
committed
Update for recent changes
1 parent d0488a3 commit 1b014ce

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

src/platform/inprocess/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ use std::ops::Deref;
2020
use std::mem;
2121
use std::usize;
2222
use uuid::Uuid;
23-
use super::Incrementor;
2423

2524
use super::incrementor::Incrementor;
2625

src/platform/unix/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ use std::time::UNIX_EPOCH;
3131
use std::thread;
3232
use mio::unix::EventedFd;
3333
use mio::{Poll, Token, Events, Ready, PollOpt};
34-
use super::Incrementor;
3534

3635
use super::incrementor::Incrementor;
3736

src/platform/windows/mod.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10-
use bincode::serde::DeserializeError;
10+
use serde;
1111
use bincode;
1212
use kernel32;
1313
use libc::intptr_t;
14-
use serde;
1514
use std::cell::{Cell, RefCell};
1615
use std::cmp::PartialEq;
1716
use std::default::Default;
@@ -26,7 +25,7 @@ use std::slice;
2625
use uuid::Uuid;
2726
use winapi::{HANDLE, INVALID_HANDLE_VALUE, LPVOID};
2827
use winapi;
29-
use super::Incrementor;
28+
use super::incrementor::Incrementor;
3029

3130
lazy_static! {
3231
static ref CURRENT_PROCESS_ID: winapi::ULONG = unsafe { kernel32::GetCurrentProcessId() };
@@ -118,7 +117,8 @@ impl<'data> Message<'data> {
118117

119118
fn oob_data(&self) -> Option<OutOfBandMessage> {
120119
if self.oob_len > 0 {
121-
let oob = bincode::serde::deserialize::<OutOfBandMessage>(self.oob_bytes())
120+
121+
let oob = bincode::deserialize::<OutOfBandMessage>(self.oob_bytes())
122122
.expect("Failed to deserialize OOB data");
123123
if oob.target_process_id != *CURRENT_PROCESS_ID {
124124
panic!("Windows IPC channel received handles intended for pid {}, but this is pid {}. \
@@ -184,7 +184,7 @@ impl OutOfBandMessage {
184184
}
185185

186186
impl serde::Serialize for OutOfBandMessage {
187-
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error>
187+
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
188188
where S: serde::Serializer
189189
{
190190
((self.target_process_id,
@@ -195,7 +195,7 @@ impl serde::Serialize for OutOfBandMessage {
195195
}
196196

197197
impl serde::Deserialize for OutOfBandMessage {
198-
fn deserialize<D>(deserializer: &mut D) -> Result<OutOfBandMessage, D::Error>
198+
fn deserialize<D>(deserializer: D) -> Result<OutOfBandMessage, D::Error>
199199
where D: serde::Deserializer
200200
{
201201
let (target_process_id, channel_handles, shmem_handles, big_data_receiver_handle) =
@@ -938,7 +938,7 @@ impl OsIpcSender {
938938
}
939939

940940
fn needs_fragmentation(data_len: usize, oob: &OutOfBandMessage) -> bool {
941-
let oob_size = if oob.needs_to_be_sent() { bincode::serde::serialized_size(oob) } else { 0 };
941+
let oob_size = if oob.needs_to_be_sent() { bincode::serialized_size(oob) } else { 0 };
942942

943943
// make sure we don't have too much oob data to begin with
944944
assert!((oob_size as usize) < (PIPE_BUFFER_SIZE-MessageHeader::size()), "too much oob data");
@@ -1023,7 +1023,7 @@ impl OsIpcSender {
10231023
// If we need to send OOB data, serialize it
10241024
let mut oob_data: Vec<u8> = vec![];
10251025
if oob.needs_to_be_sent() {
1026-
oob_data = bincode::serde::serialize(&oob, bincode::SizeLimit::Infinite).unwrap();
1026+
oob_data = bincode::serialize(&oob, bincode::Infinite).unwrap();
10271027
}
10281028

10291029
unsafe {
@@ -1463,9 +1463,9 @@ impl WinError {
14631463
}
14641464
}
14651465

1466-
impl From<WinError> for DeserializeError {
1467-
fn from(error: WinError) -> DeserializeError {
1468-
DeserializeError::IoError(error.into())
1466+
impl From<WinError> for bincode::Error {
1467+
fn from(error: WinError) -> bincode::Error {
1468+
Error::from(error).into()
14691469
}
14701470
}
14711471

0 commit comments

Comments
 (0)