🧑💻 Passes fmt and clippy checks
This commit is contained in:
parent
5b9a53cbc6
commit
d786ea1052
3 changed files with 4 additions and 10 deletions
|
|
@ -101,10 +101,7 @@ impl PoweredBy {
|
||||||
|
|
||||||
#[fn_builder]
|
#[fn_builder]
|
||||||
pub fn alter_copyright(&mut self, copyright: Option<impl Into<String>>) -> &mut Self {
|
pub fn alter_copyright(&mut self, copyright: Option<impl Into<String>>) -> &mut Self {
|
||||||
self.copyright = match copyright {
|
self.copyright = copyright.map(|c| c.into());
|
||||||
Some(c) => Some(c.into()),
|
|
||||||
_ => None,
|
|
||||||
};
|
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,7 @@ impl Minimal {
|
||||||
fn after_prepare_body(page: &mut Page) {
|
fn after_prepare_body(page: &mut Page) {
|
||||||
if let Some(true) = page.context().get_param::<bool>(PARAM_MINIMAL_ASSETS) {
|
if let Some(true) = page.context().get_param::<bool>(PARAM_MINIMAL_ASSETS) {
|
||||||
page.context().alter(ContextOp::AddStyleSheet(
|
page.context().alter(ContextOp::AddStyleSheet(
|
||||||
StyleSheet::at("/minimal/css/minimal.css")
|
StyleSheet::at("/minimal/css/minimal.css").with_version(VERSION_MINIMAL),
|
||||||
.with_version(VERSION_MINIMAL)
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,8 @@ impl PackComponents {
|
||||||
|
|
||||||
pub(crate) fn merge(packs: &[Option<&PackComponents>]) -> Self {
|
pub(crate) fn merge(packs: &[Option<&PackComponents>]) -> Self {
|
||||||
let mut pack = PackComponents::default();
|
let mut pack = PackComponents::default();
|
||||||
for p in packs {
|
for p in packs.iter().flatten() {
|
||||||
if let Some(p) = p {
|
pack.0.append(&mut p.0.clone());
|
||||||
pack.0.append(&mut p.0.clone());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
pack
|
pack
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue