♻️ Cambia Self::default() por Tipo::default()
This commit is contained in:
parent
47c47ba9a0
commit
25d32ec5de
21 changed files with 69 additions and 68 deletions
|
|
@ -49,7 +49,7 @@ impl Favicon {
|
|||
/// Equivalente a `Favicon::default()`. Se recomienda iniciar la secuencia de configuración
|
||||
/// desde aquí.
|
||||
pub fn new() -> Self {
|
||||
Favicon::default()
|
||||
Self::default()
|
||||
}
|
||||
|
||||
// **< Favicon BUILDER >************************************************************************
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ impl JavaScript {
|
|||
///
|
||||
/// Equivale a `<script src="...">`.
|
||||
pub fn from(path: impl Into<String>) -> Self {
|
||||
JavaScript {
|
||||
Self {
|
||||
source: Source::From(path.into()),
|
||||
..Default::default()
|
||||
}
|
||||
|
|
@ -100,7 +100,7 @@ impl JavaScript {
|
|||
/// Equivale a `<script src="..." defer>`. Suele ser la opción recomendada para scripts no
|
||||
/// críticos.
|
||||
pub fn defer(path: impl Into<String>) -> Self {
|
||||
JavaScript {
|
||||
Self {
|
||||
source: Source::Defer(path.into()),
|
||||
..Default::default()
|
||||
}
|
||||
|
|
@ -111,7 +111,7 @@ impl JavaScript {
|
|||
///
|
||||
/// Equivale a `<script src="..." async>`. **No garantiza** el orden relativo con otros scripts.
|
||||
pub fn asynchronous(path: impl Into<String>) -> Self {
|
||||
JavaScript {
|
||||
Self {
|
||||
source: Source::Async(path.into()),
|
||||
..Default::default()
|
||||
}
|
||||
|
|
@ -127,7 +127,7 @@ impl JavaScript {
|
|||
where
|
||||
F: Fn(&mut Context) -> String + Send + Sync + 'static,
|
||||
{
|
||||
JavaScript {
|
||||
Self {
|
||||
source: Source::Inline(name.into(), Box::new(f)),
|
||||
..Default::default()
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ impl JavaScript {
|
|||
where
|
||||
F: Fn(&mut Context) -> String + Send + Sync + 'static,
|
||||
{
|
||||
JavaScript {
|
||||
Self {
|
||||
source: Source::OnLoad(name.into(), Box::new(f)),
|
||||
..Default::default()
|
||||
}
|
||||
|
|
@ -165,7 +165,7 @@ impl JavaScript {
|
|||
where
|
||||
F: Fn(&mut Context) -> String + Send + Sync + 'static,
|
||||
{
|
||||
JavaScript {
|
||||
Self {
|
||||
source: Source::OnLoadAsync(name.into(), Box::new(f)),
|
||||
..Default::default()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ impl StyleSheet {
|
|||
///
|
||||
/// Equivale a `<link rel="stylesheet" href="...">`.
|
||||
pub fn from(path: impl Into<String>) -> Self {
|
||||
StyleSheet {
|
||||
Self {
|
||||
source: Source::From(path.into()),
|
||||
..Default::default()
|
||||
}
|
||||
|
|
@ -107,7 +107,7 @@ impl StyleSheet {
|
|||
where
|
||||
F: Fn(&mut Context) -> String + Send + Sync + 'static,
|
||||
{
|
||||
StyleSheet {
|
||||
Self {
|
||||
source: Source::Inline(name.into(), Box::new(f)),
|
||||
..Default::default()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ pub struct AttrClasses(Vec<String>);
|
|||
|
||||
impl AttrClasses {
|
||||
pub fn new(classes: impl AsRef<str>) -> Self {
|
||||
AttrClasses::default().with_value(ClassesOp::Prepend, classes)
|
||||
Self::default().with_value(ClassesOp::Prepend, classes)
|
||||
}
|
||||
|
||||
// **< AttrClasses BUILDER >********************************************************************
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue