Skip to content

Commit 05edc44

Browse files
committed
clippy: PathBuf to Path
1 parent 22ea5fe commit 05edc44

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/cmd/watch.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub fn execute(args: &ArgMatches) -> Result<()> {
5858
Ok(())
5959
}
6060

61-
fn remove_ignored_files(book_root: &PathBuf, paths: &[PathBuf]) -> Vec<PathBuf> {
61+
fn remove_ignored_files(book_root: &Path, paths: &[PathBuf]) -> Vec<PathBuf> {
6262
if paths.is_empty() {
6363
return vec![];
6464
}
@@ -81,7 +81,7 @@ fn remove_ignored_files(book_root: &PathBuf, paths: &[PathBuf]) -> Vec<PathBuf>
8181
}
8282
}
8383

84-
fn find_gitignore(book_root: &PathBuf) -> Option<PathBuf> {
84+
fn find_gitignore(book_root: &Path) -> Option<PathBuf> {
8585
book_root
8686
.ancestors()
8787
.map(|p| p.join(".gitignore"))

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ impl Default for HtmlConfig {
575575
impl HtmlConfig {
576576
/// Returns the directory of theme from the provided root directory. If the
577577
/// directory is not present it will append the default directory of "theme"
578-
pub fn theme_dir(&self, root: &PathBuf) -> PathBuf {
578+
pub fn theme_dir(&self, root: &Path) -> PathBuf {
579579
match self.theme {
580580
Some(ref d) => root.join(d),
581581
None => root.join("theme"),

src/renderer/html_handlebars/hbs_renderer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl HtmlHandlebars {
131131
&self,
132132
ctx: &RenderContext,
133133
html_config: &HtmlConfig,
134-
src_dir: &PathBuf,
134+
src_dir: &Path,
135135
handlebars: &mut Handlebars<'_>,
136136
data: &mut serde_json::Map<String, serde_json::Value>,
137137
) -> Result<()> {

0 commit comments

Comments
 (0)