File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ fn render(book: &Book, tgt: &Path) -> CliResult<()> {
82
82
83
83
let src;
84
84
if env:: args ( ) . len ( ) < 3 {
85
- src = os :: getcwd ( ) . unwrap ( ) . clone ( ) ;
85
+ src = env :: current_dir ( ) . unwrap ( ) . clone ( ) ;
86
86
} else {
87
87
src = Path :: new ( env:: args ( ) . nth ( 2 ) . unwrap ( ) . clone ( ) ) ;
88
88
}
@@ -150,7 +150,7 @@ impl Subcommand for Build {
150
150
}
151
151
fn usage ( & self ) { }
152
152
fn execute ( & mut self , term : & mut Term ) -> CommandResult < ( ) > {
153
- let cwd = os :: getcwd ( ) . unwrap ( ) ;
153
+ let cwd = env :: current_dir ( ) . unwrap ( ) ;
154
154
let src;
155
155
let tgt;
156
156
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ use term::Term;
18
18
use book;
19
19
use std:: old_io:: { Command , File } ;
20
20
use std:: os;
21
+ use std:: env;
21
22
22
23
struct Test ;
23
24
@@ -35,7 +36,7 @@ impl Subcommand for Test {
35
36
}
36
37
fn usage ( & self ) { }
37
38
fn execute ( & mut self , term : & mut Term ) -> CommandResult < ( ) > {
38
- let cwd = os :: getcwd ( ) . unwrap ( ) ;
39
+ let cwd = env :: current_dir ( ) . unwrap ( ) ;
39
40
let src = cwd. clone ( ) ;
40
41
41
42
let summary = File :: open ( & src. join ( "SUMMARY.md" ) ) ;
You can’t perform that action at this time.
0 commit comments