From 3111c6e3293907a6258d08a8b82b9918d6879501 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Fri, 1 Dec 2017 00:27:35 +0300 Subject: [PATCH] Fix build on nightly --- examples/http-server.rs | 2 +- src/sync/mpsc.rs | 4 +++- src/timer.rs | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/http-server.rs b/examples/http-server.rs index c0132df08..83347cdcd 100644 --- a/examples/http-server.rs +++ b/examples/http-server.rs @@ -44,7 +44,6 @@ fn main() { let mut buf_i = 0; let mut buf = [0u8; 1024]; - let mut headers = [httparse::EMPTY_HEADER; 16]; loop { let len = try!(conn.read(&mut buf[buf_i..])); @@ -54,6 +53,7 @@ fn main() { buf_i += len; + let mut headers = [httparse::EMPTY_HEADER; 16]; let mut req = httparse::Request::new(&mut headers); let res = req.parse(&buf[0..buf_i]).unwrap(); diff --git a/src/sync/mpsc.rs b/src/sync/mpsc.rs index f65a61f0e..0b4f28483 100644 --- a/src/sync/mpsc.rs +++ b/src/sync/mpsc.rs @@ -23,11 +23,13 @@ struct ChannelShared { /// Create with `channel()` pub struct Receiver(RcEventSource>); -struct ReceiverCore { +#[doc(hidden)] +pub struct __ReceiverCore { receiver: mpsc::Receiver, shared: ArcChannelShared, counter: ArcCounter, } +use self::__ReceiverCore as ReceiverCore; impl EventedImpl for Receiver where T: 'static diff --git a/src/timer.rs b/src/timer.rs index 634e755ce..8dfa74236 100644 --- a/src/timer.rs +++ b/src/timer.rs @@ -15,11 +15,13 @@ pub struct Timer { rc: RcEventSource, } -struct TimerCore { +#[doc(hidden)] +pub struct __TimerCore { // TODO: Rename these two? timeout: Instant, mio_timeout: Option, } +use self::__TimerCore as TimerCore; impl Timer { /// Create a new timer