From 09729aaca53c591014bdb5222ac3d9e16133c571 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Sun, 1 Jan 2017 16:02:48 -0800 Subject: [PATCH] Clean up some Path code in bookconfig --- src/book/bookconfig.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/book/bookconfig.rs b/src/book/bookconfig.rs index 50bcb76d..63c668d1 100644 --- a/src/book/bookconfig.rs +++ b/src/book/bookconfig.rs @@ -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"));