Skip to content

Commit a0375e1

Browse files
committed
Rollup merge of rust-lang#22505 - tshepang:current_dir, r=steveklabnik
2 parents 1acd7c9 + ac3a390 commit a0375e1

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/rustbook/build.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
//! Implementation of the `build` subcommand, used to compile a book.
1212
13-
use std::os;
1413
use std::env;
1514
use std::old_io;
1615
use std::old_io::{fs, File, BufferedWriter, TempDir, IoResult};
@@ -82,7 +81,7 @@ fn render(book: &Book, tgt: &Path) -> CliResult<()> {
8281

8382
let src;
8483
if env::args().len() < 3 {
85-
src = os::getcwd().unwrap().clone();
84+
src = env::current_dir().unwrap().clone();
8685
} else {
8786
src = Path::new(env::args().nth(2).unwrap().clone());
8887
}
@@ -150,7 +149,7 @@ impl Subcommand for Build {
150149
}
151150
fn usage(&self) {}
152151
fn execute(&mut self, term: &mut Term) -> CommandResult<()> {
153-
let cwd = os::getcwd().unwrap();
152+
let cwd = env::current_dir().unwrap();
154153
let src;
155154
let tgt;
156155

src/rustbook/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#![feature(collections)]
1313
#![feature(core)]
1414
#![feature(old_io)]
15-
#![feature(os)]
1615
#![feature(env)]
1716
#![feature(old_path)]
1817
#![feature(rustdoc)]

src/rustbook/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use error::Error;
1717
use term::Term;
1818
use book;
1919
use std::old_io::{Command, File};
20-
use std::os;
20+
use std::env;
2121

2222
struct Test;
2323

@@ -35,7 +35,7 @@ impl Subcommand for Test {
3535
}
3636
fn usage(&self) {}
3737
fn execute(&mut self, term: &mut Term) -> CommandResult<()> {
38-
let cwd = os::getcwd().unwrap();
38+
let cwd = env::current_dir().unwrap();
3939
let src = cwd.clone();
4040

4141
let summary = File::open(&src.join("SUMMARY.md"));

0 commit comments

Comments
 (0)