🧑💻 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]
|
||||
pub fn alter_copyright(&mut self, copyright: Option<impl Into<String>>) -> &mut Self {
|
||||
self.copyright = match copyright {
|
||||
Some(c) => Some(c.into()),
|
||||
_ => None,
|
||||
};
|
||||
self.copyright = copyright.map(|c| c.into());
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,8 +48,7 @@ impl Minimal {
|
|||
fn after_prepare_body(page: &mut Page) {
|
||||
if let Some(true) = page.context().get_param::<bool>(PARAM_MINIMAL_ASSETS) {
|
||||
page.context().alter(ContextOp::AddStyleSheet(
|
||||
StyleSheet::at("/minimal/css/minimal.css")
|
||||
.with_version(VERSION_MINIMAL)
|
||||
StyleSheet::at("/minimal/css/minimal.css").with_version(VERSION_MINIMAL),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,10 +55,8 @@ impl PackComponents {
|
|||
|
||||
pub(crate) fn merge(packs: &[Option<&PackComponents>]) -> Self {
|
||||
let mut pack = PackComponents::default();
|
||||
for p in packs {
|
||||
if let Some(p) = p {
|
||||
pack.0.append(&mut p.0.clone());
|
||||
}
|
||||
for p in packs.iter().flatten() {
|
||||
pack.0.append(&mut p.0.clone());
|
||||
}
|
||||
pack
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue