fix(rustup): update to latest rustc

This commit is contained in:
Sean McArthur
2015-03-16 12:01:38 -07:00
parent 932baac171
commit 4fd8a6a9dc
8 changed files with 14 additions and 8 deletions

View File

@@ -16,6 +16,7 @@ cookie = "*"
httparse = "*"
log = ">= 0.2.0"
mime = "*"
num_cpus = "*"
openssl = "*"
rustc-serialize = "*"
time = "*"

View File

@@ -1,3 +1,4 @@
#![deny(warnings)]
#![feature(collections, io, net, test)]
extern crate hyper;

View File

@@ -1,4 +1,5 @@
#![feature(io, net, test)]
#![deny(warnings)]
#![feature(net, test)]
extern crate hyper;
extern crate test;

View File

@@ -4,6 +4,7 @@ extern crate hyper;
extern crate env_logger;
use std::env;
use std::io;
use hyper::Client;
@@ -20,12 +21,12 @@ fn main() {
let mut client = Client::new();
let res = match client.get(&*url).send() {
let mut res = match client.get(&*url).send() {
Ok(res) => res,
Err(err) => panic!("Failed to connect: {:?}", err)
};
println!("Response: {}", res.status);
println!("Headers:\n{}", res.headers);
//TODO: add copy back when std::stdio impls std::io::Write.
io::copy(&mut res, &mut io::stdout()).unwrap();
}

View File

@@ -1,5 +1,5 @@
#![deny(warnings)]
#![feature(io, net)]
#![feature(net)]
extern crate hyper;
extern crate env_logger;

View File

@@ -1,5 +1,5 @@
#![deny(warnings)]
#![feature(io, net)]
#![feature(net)]
extern crate hyper;
extern crate env_logger;

View File

@@ -1,4 +1,4 @@
#![feature(core, collections, io, net, os, path,
#![feature(core, collections, io, net,
std_misc, box_syntax, unsafe_destructor)]
#![deny(missing_docs)]
#![cfg_attr(test, deny(warnings))]
@@ -133,6 +133,7 @@ extern crate openssl;
extern crate cookie;
extern crate unicase;
extern crate httparse;
extern crate num_cpus;
#[macro_use]
extern crate log;

View File

@@ -2,10 +2,11 @@
use std::io::{BufReader, BufWriter};
use std::marker::PhantomData;
use std::net::{IpAddr, SocketAddr};
use std::os;
use std::path::Path;
use std::thread::{self, JoinGuard};
use num_cpus;
pub use self::request::Request;
pub use self::response::Response;
@@ -83,7 +84,7 @@ impl<'a, H: Handler + 'static> Server<'a, H, HttpListener> {
/// Binds to a socket and starts handling connections.
pub fn listen(self, ip: IpAddr, port: u16) -> HttpResult<Listening> {
self.listen_threads(ip, port, os::num_cpus() * 5 / 4)
self.listen_threads(ip, port, num_cpus::get() * 5 / 4)
}
}
impl<