From 55f625a96b84a2605b6f80ee3facf8061d0b00b0 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Wed, 18 Feb 2015 23:24:28 +0200 Subject: [PATCH 1/3] os.getcwd renamed to env::current_dir --- src/rustbook/build.rs | 4 ++-- src/rustbook/test.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rustbook/build.rs b/src/rustbook/build.rs index 6f5fc5c1969f0..12eb156873e8b 100644 --- a/src/rustbook/build.rs +++ b/src/rustbook/build.rs @@ -82,7 +82,7 @@ fn render(book: &Book, tgt: &Path) -> CliResult<()> { let src; if env::args().len() < 3 { - src = os::getcwd().unwrap().clone(); + src = env::current_dir().unwrap().clone(); } else { src = Path::new(env::args().nth(2).unwrap().clone()); } @@ -150,7 +150,7 @@ impl Subcommand for Build { } fn usage(&self) {} fn execute(&mut self, term: &mut Term) -> CommandResult<()> { - let cwd = os::getcwd().unwrap(); + let cwd = env::current_dir().unwrap(); let src; let tgt; diff --git a/src/rustbook/test.rs b/src/rustbook/test.rs index d3cb8a7316e86..19c640ec7947e 100644 --- a/src/rustbook/test.rs +++ b/src/rustbook/test.rs @@ -18,6 +18,7 @@ use term::Term; use book; use std::old_io::{Command, File}; use std::os; +use std::env; struct Test; @@ -35,7 +36,7 @@ impl Subcommand for Test { } fn usage(&self) {} fn execute(&mut self, term: &mut Term) -> CommandResult<()> { - let cwd = os::getcwd().unwrap(); + let cwd = env::current_dir().unwrap(); let src = cwd.clone(); let summary = File::open(&src.join("SUMMARY.md")); From 2f735f52c9034ed8a30b7255329fa342dfeb20a5 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Wed, 18 Feb 2015 23:25:58 +0200 Subject: [PATCH 2/3] unused imports --- src/rustbook/build.rs | 1 - src/rustbook/test.rs | 1 - 2 files changed, 2 deletions(-) diff --git a/src/rustbook/build.rs b/src/rustbook/build.rs index 12eb156873e8b..f2ab68ddee0f0 100644 --- a/src/rustbook/build.rs +++ b/src/rustbook/build.rs @@ -10,7 +10,6 @@ //! Implementation of the `build` subcommand, used to compile a book. -use std::os; use std::env; use std::old_io; use std::old_io::{fs, File, BufferedWriter, TempDir, IoResult}; diff --git a/src/rustbook/test.rs b/src/rustbook/test.rs index 19c640ec7947e..18a746f10aad7 100644 --- a/src/rustbook/test.rs +++ b/src/rustbook/test.rs @@ -17,7 +17,6 @@ use error::Error; use term::Term; use book; use std::old_io::{Command, File}; -use std::os; use std::env; struct Test; From ac3a39015c7fb88fb0119fab568430edb8e4ddf4 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Wed, 18 Feb 2015 23:27:32 +0200 Subject: [PATCH 3/3] rustbook: no-longer-used feature gate --- src/rustbook/main.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/rustbook/main.rs b/src/rustbook/main.rs index ace57f0ac2c0b..9bcfc7f45d341 100644 --- a/src/rustbook/main.rs +++ b/src/rustbook/main.rs @@ -12,7 +12,6 @@ #![feature(collections)] #![feature(core)] #![feature(old_io)] -#![feature(os)] #![feature(env)] #![feature(old_path)] #![feature(rustdoc)]