Move binaries to examples

This commit is contained in:
Alex Crichton 2016-09-01 09:18:03 -07:00
parent 6c6fb917ee
commit 02538d035f
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
//! An echo server that just writes back everything that's written to it.
extern crate env_logger;
extern crate futures;
extern crate tokio_core;
@ -12,6 +13,7 @@ use tokio_core::Loop;
use tokio_core::io::{copy, TaskIo};
fn main() {
env_logger::init().unwrap();
let addr = env::args().nth(1).unwrap_or("127.0.0.1:8080".to_string());
let addr = addr.parse::<SocketAddr>().unwrap();

View File

@ -3,7 +3,7 @@
//! There is no concurrency in this server, only one connection is written to at
//! a time.
#[macro_use]
extern crate env_logger;
extern crate futures;
extern crate tokio_core;
@ -16,6 +16,7 @@ use futures::stream::{self, Stream};
use tokio_core::io::IoFuture;
fn main() {
env_logger::init().unwrap();
let addr = env::args().nth(1).unwrap_or("127.0.0.1:8080".to_string());
let addr = addr.parse::<SocketAddr>().unwrap();