We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f054b7e commit b68cb9fCopy full SHA for b68cb9f
crates/metassr-html/src/html_props.rs
@@ -1,9 +1,6 @@
1
-use std::{
2
- marker::Sized,
3
- path::{Path, PathBuf},
4
-};
+use std::path::{Path, PathBuf};
5
6
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone, Default)]
7
pub struct HtmlProps {
8
// TODO: getting html language from a config file stored in web application root.
9
pub lang: String,
@@ -65,15 +62,15 @@ impl HtmlPropsBuilder {
65
62
body: self.body.as_ref().unwrap_or(&String::new()).to_owned(),
66
63
scripts: self
67
64
.scripts
68
- .as_ref()
69
- .unwrap()
+ .as_deref()
+ .unwrap_or(&[])
70
.iter()
71
.map(|p| Path::new(p).to_path_buf())
72
.collect(),
73
styles: self
74
.styles
75
76
77
78
79
0 commit comments