Skip to content

Commit 3af8b68

Browse files
committed
fix(rustup): switch to unstable features
1 parent 4ad4c49 commit 3af8b68

15 files changed

+20
-19
lines changed

benches/client.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(unstable)]
1+
#![feature(core, io, test)]
22
extern crate hyper;
33

44
extern crate test;

benches/client_mock_tcp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(unstable)]
1+
#![feature(core, collections, io, test)]
22
extern crate hyper;
33

44
extern crate test;

benches/server.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(unstable)]
1+
#![feature(io, test)]
22
extern crate hyper;
33
extern crate test;
44

@@ -26,7 +26,7 @@ fn bench_hyper(b: &mut Bencher) {
2626
let server = hyper::Server::http(Ipv4Addr(127, 0, 0, 1), 0);
2727
let mut listener = server.listen(hyper_handle).unwrap();
2828

29-
let url = hyper::Url::parse(format!("http://{}", listener.socket).as_slice()).unwrap();
29+
let url = hyper::Url::parse(&*format!("http://{}", listener.socket)).unwrap();
3030
b.iter(|| request(url.clone()));
3131
listener.close().unwrap();
3232
}

examples/client.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(unstable)]
1+
#![feature(os, io)]
22
extern crate hyper;
33

44
use std::os;

examples/hello.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(unstable)]
1+
#![feature(io)]
22
extern crate hyper;
33

44
use std::old_io::net::ip::Ipv4Addr;

examples/server.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(unstable)]
1+
#![feature(core, io)]
22
extern crate hyper;
33
#[macro_use] extern crate log;
44

@@ -21,7 +21,7 @@ macro_rules! try_return(
2121

2222
fn echo(mut req: Request, mut res: Response) {
2323
match req.uri {
24-
AbsolutePath(ref path) => match (&req.method, path.as_slice()) {
24+
AbsolutePath(ref path) => match (&req.method, &path[]) {
2525
(&Get, "/") | (&Get, "/echo") => {
2626
let out = b"Try POST /echo";
2727

src/header/common/access_control/allow_headers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use header;
1010
/// > during the actual request.
1111
///
1212
/// Spec: www.w3.org/TR/cors/#access-control-allow-headers-response-header
13-
#[derive(Clone, PartialEq, Show)]
13+
#[derive(Clone, PartialEq, Debug)]
1414
pub struct AccessControlAllowHeaders(pub Vec<String>);
1515

1616
impl header::Header for AccessControlAllowHeaders {

src/header/common/access_control/allow_methods.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use method;
1111
/// > actual request.
1212
///
1313
/// Spec: www.w3.org/TR/cors/#access-control-allow-methods-response-header
14-
#[derive(Clone, PartialEq, Show)]
14+
#[derive(Clone, PartialEq, Debug)]
1515
pub struct AccessControlAllowMethods(pub Vec<method::Method>);
1616

1717
impl header::Header for AccessControlAllowMethods {

src/header/common/access_control/allow_origin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use header;
1313
/// > "*", or "null" in the response.
1414
///
1515
/// Spec: www.w3.org/TR/cors/#access-control-allow-origin-response-header
16-
#[derive(Clone, PartialEq, Show)]
16+
#[derive(Clone, PartialEq, Debug)]
1717
pub enum AccessControlAllowOrigin {
1818
/// Allow all origins
1919
AllowStar,

src/header/common/access_control/max_age.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use header;
99
/// > preflight request can be cached in a preflight result cache.
1010
///
1111
/// Spec: www.w3.org/TR/cors/#access-control-max-age-response-header
12-
#[derive(Clone, Copy, PartialEq, Show)]
12+
#[derive(Clone, Copy, PartialEq, Debug)]
1313
pub struct AccessControlMaxAge(pub u32);
1414

1515
impl header::Header for AccessControlMaxAge {

src/header/common/access_control/request_headers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use header;
99
/// > be used in the actual request as part of the preflight request.
1010
///
1111
/// Spec: www.w3.org/TR/cors/#access-control-request-headers-request-header
12-
#[derive(Clone, PartialEq, Show)]
12+
#[derive(Clone, PartialEq, Debug)]
1313
pub struct AccessControlRequestHeaders(pub Vec<String>);
1414

1515
impl header::Header for AccessControlRequestHeaders {

src/header/common/access_control/request_method.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use method::Method;
1010
/// > used in the actual request as part of the preflight request.
1111
///
1212
/// Spec: www.w3.org/TR/cors/#access-control-request-method-request-header
13-
#[derive(Clone, PartialEq, Show)]
13+
#[derive(Clone, PartialEq, Debug)]
1414
pub struct AccessControlRequestMethod(pub Method);
1515

1616
impl header::Header for AccessControlRequestMethod {

src/header/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ impl fmt::Display for Box<HeaderFormat + Send + Sync> {
484484
}
485485
}
486486

487-
/// A wrapper around any Header with a Show impl that calls fmt_header.
487+
/// A wrapper around any Header with a Display impl that calls fmt_header.
488488
///
489489
/// This can be used like so: `format!("{}", HeaderFormatter(&header))` to
490490
/// get the representation of a Header which will be written to an
@@ -555,7 +555,7 @@ mod tests {
555555
assert_eq!(accept, Some(Accept(vec![application_vendor, text_plain])));
556556
}
557557

558-
#[derive(Clone, Show)]
558+
#[derive(Clone, Debug)]
559559
struct CrazyLength(Option<bool>, usize);
560560

561561
impl Header for CrazyLength {

src/http.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ pub fn read_request_line<R: Reader>(stream: &mut R) -> HttpResult<RequestLine> {
586586
pub type StatusLine = (HttpVersion, RawStatus);
587587

588588
/// The raw status code and reason-phrase.
589-
#[derive(PartialEq, Show)]
589+
#[derive(PartialEq, Debug)]
590590
pub struct RawStatus(pub u16, pub CowString<'static>);
591591

592592
impl Clone for RawStatus {

src/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
#![feature(slicing_syntax, box_syntax)]
1+
#![feature(core, collections, hash, io, os, std_misc,
2+
slicing_syntax, box_syntax)]
23
#![deny(missing_docs)]
3-
#![allow(unstable)]
44
#![cfg_attr(test, deny(warnings))]
5+
#![cfg_attr(test, feature(test))]
56

67
//! # Hyper
78
//! Hyper is a fast, modern HTTP implementation written in and for Rust. It

0 commit comments

Comments
 (0)