use default

This commit is contained in:
Mylloon 2024-11-28 17:50:32 +01:00
parent dd6f16bd70
commit 758dfcea5b
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 3 additions and 9 deletions

View file

@ -93,7 +93,7 @@ pub struct MFile {
#[allow(clippy::struct_excessive_bools)] #[allow(clippy::struct_excessive_bools)]
/// Global metadata /// Global metadata
#[derive(Content, Debug, Clone)] #[derive(Content, Debug, Clone, Default)]
pub struct Metadata { pub struct Metadata {
pub info: MFile, pub info: MFile,
pub math: bool, pub math: bool,

View file

@ -13,7 +13,7 @@ use crate::config::FileConfiguration;
use super::{ use super::{
markdown::{read_md, File}, markdown::{read_md, File},
metadata::{MFile, MType, Metadata}, metadata::{MType, Metadata},
}; };
#[cached] #[cached]
@ -72,13 +72,7 @@ fn read_pdf(data: Vec<u8>) -> File {
let pdf = general_purpose::STANDARD.encode(data); let pdf = general_purpose::STANDARD.encode(data);
File { File {
metadata: Metadata { metadata: Metadata::default(),
info: MFile::default(),
mermaid: false,
syntax_highlight: false,
math: false,
mail_obfsucated: false,
},
content: format!( content: format!(
r#"<embed r#"<embed
src="data:application/pdf;base64,{pdf}" src="data:application/pdf;base64,{pdf}"