needless pass by value
This commit is contained in:
parent
48a1518d7f
commit
1ddeefa727
3 changed files with 6 additions and 6 deletions
|
@ -92,15 +92,15 @@ fn build_page(config: Config) -> String {
|
|||
MType::Generic,
|
||||
);
|
||||
|
||||
let mut socials = read(FilePath {
|
||||
let mut socials = read(&FilePath {
|
||||
base: contacts_dir.clone(),
|
||||
path: format!("socials/*{ext}"),
|
||||
});
|
||||
let mut forges = read(FilePath {
|
||||
let mut forges = read(&FilePath {
|
||||
base: contacts_dir.clone(),
|
||||
path: format!("forges/*{ext}"),
|
||||
});
|
||||
let mut others = read(FilePath {
|
||||
let mut others = read(&FilePath {
|
||||
base: contacts_dir,
|
||||
path: format!("others/*{ext}"),
|
||||
});
|
||||
|
|
|
@ -159,7 +159,7 @@ fn custom_img_size(html: &str) -> String {
|
|||
|
||||
/// Fix local images to base64 and integration of markdown files
|
||||
fn fix_images_and_integration(
|
||||
path: FilePath,
|
||||
path: &FilePath,
|
||||
html: &str,
|
||||
metadata_type: MType,
|
||||
recursive: bool,
|
||||
|
@ -258,7 +258,7 @@ pub fn read_md(
|
|||
let children_metadata;
|
||||
let mail_obfsucated;
|
||||
(html_content, children_metadata) =
|
||||
fix_images_and_integration(path, &html_content, metadata_type, recursive);
|
||||
fix_images_and_integration(&path, &html_content, metadata_type, recursive);
|
||||
html_content = custom_img_size(&html_content);
|
||||
(html_content, mail_obfsucated) = mail_obfuscation(&html_content);
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ pub fn remove_paragraphs(list: &mut [File]) {
|
|||
.for_each(|file| file.content = file.content.replace("<p>", "").replace("</p>", ""));
|
||||
}
|
||||
|
||||
pub fn read(path: FilePath) -> Vec<File> {
|
||||
pub fn read(path: &FilePath) -> Vec<File> {
|
||||
glob(&path.to_string())
|
||||
.unwrap()
|
||||
.map(|e| read_file(path.from(&e.unwrap().to_string_lossy()), MType::Contact).unwrap())
|
||||
|
|
Loading…
Reference in a new issue