Actualiza para cumplir recomendaciones de clippy
Básicamente a todos los componentes y elementos principales se les implementa Default() y se adaptan los constructores para inicializar los campos de sus estructuras de datos.
This commit is contained in:
parent
0e974d6d59
commit
261cea6c2f
30 changed files with 372 additions and 448 deletions
|
|
@ -7,7 +7,7 @@ use std::collections::HashMap;
|
|||
|
||||
include!(concat!(env!("OUT_DIR"), "/mdbook.rs"));
|
||||
|
||||
static MDBOOK: LazyStatic<HashMap<&'static str, Resource>> = LazyStatic::new(|| generate());
|
||||
static MDBOOK: LazyStatic<HashMap<&'static str, Resource>> = LazyStatic::new(generate);
|
||||
|
||||
pub_const_handler!(MODULE_MDBOOK);
|
||||
|
||||
|
|
@ -38,14 +38,8 @@ async fn mdbook_page(request: app::HttpRequest) -> ResultPage<Markup, FatalError
|
|||
Some(title) => title,
|
||||
_ => "Documentación",
|
||||
};
|
||||
let _print = match extract("Print", html) {
|
||||
Some("enabled") => true,
|
||||
_ => false,
|
||||
};
|
||||
let _mathjax = match extract("MathJax", html) {
|
||||
Some("supported") => true,
|
||||
_ => false,
|
||||
};
|
||||
let _print = matches!(extract("Print", html), Some("enabled"));
|
||||
let _mathjax = matches!(extract("MathJax", html), Some("supported"));
|
||||
let beginning = {
|
||||
let separator = "<!-- mdBook -->";
|
||||
match html.find(separator) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue