rustup: sweeping fixes for all the changes in 1.0-alpha
- Some switches to u64 instead of usize - For now, allow(unstable) - use associated types for all the Network stuff
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#![allow(unstable)]
|
||||
extern crate hyper;
|
||||
|
||||
use std::os;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#![allow(unstable)]
|
||||
extern crate hyper;
|
||||
|
||||
use std::io::net::ip::Ipv4Addr;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#![allow(unstable)]
|
||||
extern crate hyper;
|
||||
#[macro_use] extern crate log;
|
||||
|
||||
@@ -24,7 +25,7 @@ fn echo(mut req: Request, mut res: Response) {
|
||||
(&Get, "/") | (&Get, "/echo") => {
|
||||
let out = b"Try POST /echo";
|
||||
|
||||
res.headers_mut().set(ContentLength(out.len()));
|
||||
res.headers_mut().set(ContentLength(out.len() as u64));
|
||||
let mut res = try_return!(res.start());
|
||||
try_return!(res.write(out));
|
||||
try_return!(res.end());
|
||||
|
||||
Reference in New Issue
Block a user