Skip to content

Commit 9a318ad

Browse files
authored
Merge pull request #197 from mbrubeck/cleanup
Clean up some Path code in bookconfig
2 parents 3ffd24d + 09729aa commit 9a318ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/book/bookconfig.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ impl BookConfig {
6262

6363
// Read book.toml or book.json if exists
6464

65-
if Path::new(root.join("book.toml").as_os_str()).exists() {
65+
if root.join("book.toml").exists() {
6666

6767
debug!("[*]: Reading config");
6868
let data = read_file(root.join("book.toml"));
6969
self.parse_from_toml_string(&data);
7070

71-
} else if Path::new(root.join("book.json").as_os_str()).exists() {
71+
} else if root.join("book.json").exists() {
7272

7373
debug!("[*]: Reading config");
7474
let data = read_file(root.join("book.json"));

0 commit comments

Comments
 (0)