File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change 1- #![ feature( env, os , io) ]
1+ #![ feature( env, io) ]
22extern crate hyper;
33
44use std:: env;
@@ -16,17 +16,9 @@ fn main() {
1616 }
1717 } ;
1818
19- let url = match url. to_str ( ) {
20- Some ( url) => url,
21- None => {
22- println ! ( "Url contains invalid unicode" ) ;
23- return ;
24- }
25- } ;
26-
2719 let mut client = Client :: new ( ) ;
2820
29- let mut res = match client. get ( url) . send ( ) {
21+ let mut res = match client. get ( & * url) . send ( ) {
3022 Ok ( res) => res,
3123 Err ( err) => panic ! ( "Failed to connect: {:?}" , err)
3224 } ;
Original file line number Diff line number Diff line change 22 slicing_syntax, box_syntax) ]
33#![ deny( missing_docs) ]
44#![ cfg_attr( test, deny( warnings) ) ]
5- #![ cfg_attr( test, feature( test) ) ]
5+ #![ cfg_attr( test, feature( alloc , test) ) ]
66
77//! # Hyper
88//! Hyper is a fast, modern HTTP implementation written in and for Rust. It
You can’t perform that action at this time.
0 commit comments