Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on nightly #159

Merged
merged 1 commit into from
Dec 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/http-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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..]));

Expand All @@ -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();

Expand Down
4 changes: 3 additions & 1 deletion src/sync/mpsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ struct ChannelShared {
/// Create with `channel()`
pub struct Receiver<T>(RcEventSource<ReceiverCore<T>>);

struct ReceiverCore<T> {
#[doc(hidden)]
pub struct __ReceiverCore<T> {
receiver: mpsc::Receiver<T>,
shared: ArcChannelShared,
counter: ArcCounter,
}
use self::__ReceiverCore as ReceiverCore;

impl<T> EventedImpl for Receiver<T>
where T: 'static
Expand Down
4 changes: 3 additions & 1 deletion src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ pub struct Timer {
rc: RcEventSource<TimerCore>,
}

struct TimerCore {
#[doc(hidden)]
pub struct __TimerCore {
// TODO: Rename these two?
timeout: Instant,
mio_timeout: Option<mio_orig::Timeout>,
}
use self::__TimerCore as TimerCore;

impl Timer {
/// Create a new timer
Expand Down