Skip to content

Commit 55f625a

Browse files
committed
os.getcwd renamed to env::current_dir
1 parent dfc5c0f commit 55f625a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/rustbook/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ fn render(book: &Book, tgt: &Path) -> CliResult<()> {
8282

8383
let src;
8484
if env::args().len() < 3 {
85-
src = os::getcwd().unwrap().clone();
85+
src = env::current_dir().unwrap().clone();
8686
} else {
8787
src = Path::new(env::args().nth(2).unwrap().clone());
8888
}
@@ -150,7 +150,7 @@ impl Subcommand for Build {
150150
}
151151
fn usage(&self) {}
152152
fn execute(&mut self, term: &mut Term) -> CommandResult<()> {
153-
let cwd = os::getcwd().unwrap();
153+
let cwd = env::current_dir().unwrap();
154154
let src;
155155
let tgt;
156156

src/rustbook/test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use term::Term;
1818
use book;
1919
use std::old_io::{Command, File};
2020
use std::os;
21+
use std::env;
2122

2223
struct Test;
2324

@@ -35,7 +36,7 @@ impl Subcommand for Test {
3536
}
3637
fn usage(&self) {}
3738
fn execute(&mut self, term: &mut Term) -> CommandResult<()> {
38-
let cwd = os::getcwd().unwrap();
39+
let cwd = env::current_dir().unwrap();
3940
let src = cwd.clone();
4041

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

0 commit comments

Comments
 (0)