Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymi306 committed Aug 5, 2023
1 parent b030b53 commit a468550
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
11 changes: 8 additions & 3 deletions components/site/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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,
)?;
}
}

Expand Down
7 changes: 6 additions & 1 deletion components/utils/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit a468550

Please sign in to comment.