needless pass by value
This commit is contained in:
parent
1ddeefa727
commit
04a8eead65
2 changed files with 4 additions and 4 deletions
|
@ -192,7 +192,7 @@ fn fix_images_and_integration(
|
|||
let mut options = get_options(Some(path.clone()), metadata_type);
|
||||
options.extension.footnotes = false;
|
||||
let data = read_md(
|
||||
path.from(&img_path),
|
||||
&path.from(&img_path),
|
||||
&file,
|
||||
metadata_type,
|
||||
Some(options),
|
||||
|
@ -226,7 +226,7 @@ fn fix_images_and_integration(
|
|||
|
||||
/// Transform markdown string to File structure
|
||||
pub fn read_md(
|
||||
path: FilePath,
|
||||
path: &FilePath,
|
||||
raw_text: &str,
|
||||
metadata_type: MType,
|
||||
options: Option<Options>,
|
||||
|
@ -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);
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ pub fn read_file(filename: FilePath, expected_file: MType) -> Option<File> {
|
|||
.and_then(|ext| match ext.to_str().unwrap() {
|
||||
"pdf" => fs::read(&as_str).map_or(None, |bytes| Some(read_pdf(bytes))),
|
||||
_ => fs::read_to_string(&as_str).map_or(None, |text| {
|
||||
Some(read_md(filename, &text, expected_file, None, true))
|
||||
Some(read_md(&filename, &text, expected_file, None, true))
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue