os.getcwd renamed to env::current_dir
This commit is contained in:
parent
dfc5c0f1e8
commit
55f625a96b
2 changed files with 4 additions and 3 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue