From 8a55029c7de2d95d6777bae3d215f5f152c03d02 Mon Sep 17 00:00:00 2001 From: Alexis Mousset Date: Fri, 27 Feb 2015 19:57:15 +0100 Subject: [PATCH] use std::env instead od std::os --- examples/client.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/client.rs b/examples/client.rs index a2a48ae..2e63d85 100644 --- a/examples/client.rs +++ b/examples/client.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(core, old_io, rustc_private, os, collections)] +#![feature(core, old_io, rustc_private, env, collections)] #[macro_use] extern crate log; extern crate smtp; @@ -16,7 +16,7 @@ extern crate getopts; use std::old_io::stdin; use std::old_io::net::ip::Port; use std::string::String; -use std::os; +use std::env; use getopts::{optopt, optflag, getopts, OptGroup, usage}; use smtp::client::Client; @@ -45,14 +45,14 @@ fn print_usage(description: String, _opts: &[OptGroup]) { } fn main() { - let args = os::args(); + let args = env::args(); let mut args_string = Vec::new(); - for arg in args.iter() { + for arg in args { args_string.push(arg.clone()); }; - let program = args[0].clone(); + let program = args_string[0].clone(); let description = format!("Usage: {0} [options...] recipients\n\n\ This program reads a message on standard input until it reaches\ EOF, then tries to send it using the given paramters.\n\n\