From a468550bb7a4ea0683085dc75586da7a94a80e28 Mon Sep 17 00:00:00 2001 From: Andrew Langmeier Date: Sat, 5 Aug 2023 22:19:22 +0000 Subject: [PATCH] cargo fmt --- components/site/src/lib.rs | 11 ++++++++--- components/utils/src/fs.rs | 7 ++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index bdb64e3699..945027ac6e 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -22,8 +22,8 @@ use libs::relative_path::RelativePathBuf; use std::time::Instant; use templates::{load_tera, render_redirect_template}; use utils::fs::{ - clean_site_output_folder, copy_directory, - copy_file_if_needed, create_directory, create_file, ensure_directory_exists, + clean_site_output_folder, copy_directory, copy_file_if_needed, create_directory, create_file, + ensure_directory_exists, }; use utils::net::{get_available_port, is_external_link}; use utils::templates::{render_template, ShortcodeDefinition}; @@ -600,7 +600,12 @@ impl Site { gs, )?; } else { - copy_directory(&self.static_path, &self.output_path, self.config.hard_link_static, None)?; + copy_directory( + &self.static_path, + &self.output_path, + self.config.hard_link_static, + None, + )?; } } diff --git a/components/utils/src/fs.rs b/components/utils/src/fs.rs index cdff9d77ab..f2e5093f87 100644 --- a/components/utils/src/fs.rs +++ b/components/utils/src/fs.rs @@ -116,7 +116,12 @@ pub fn copy_file_if_needed(src: &Path, dest: &Path, hard_link: bool) -> Result<( Ok(()) } -pub fn copy_directory(src: &Path, dest: &Path, hard_link: bool, ignore_globset: Option<&GlobSet>) -> Result<()> { +pub fn copy_directory( + src: &Path, + dest: &Path, + hard_link: bool, + ignore_globset: Option<&GlobSet>, +) -> Result<()> { for entry in WalkDir::new(src).follow_links(true).into_iter().filter_map(std::result::Result::ok) {