mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-14 14:52:37 +00:00
Merge pull request #197 from mbrubeck/cleanup
Clean up some Path code in bookconfig
This commit is contained in:
commit
9a318adc03
1 changed files with 2 additions and 2 deletions
|
@ -62,13 +62,13 @@ impl BookConfig {
|
|||
|
||||
// Read book.toml or book.json if exists
|
||||
|
||||
if Path::new(root.join("book.toml").as_os_str()).exists() {
|
||||
if root.join("book.toml").exists() {
|
||||
|
||||
debug!("[*]: Reading config");
|
||||
let data = read_file(root.join("book.toml"));
|
||||
self.parse_from_toml_string(&data);
|
||||
|
||||
} else if Path::new(root.join("book.json").as_os_str()).exists() {
|
||||
} else if root.join("book.json").exists() {
|
||||
|
||||
debug!("[*]: Reading config");
|
||||
let data = read_file(root.join("book.json"));
|
||||
|
|
Loading…
Reference in a new issue