♻️ Confirma mi adicción a refactorizar código
This commit is contained in:
parent
0d2a1b37c5
commit
a2add5b09c
4 changed files with 7 additions and 6 deletions
|
|
@ -6,7 +6,7 @@ use crate::core::{module, module::ModuleStaticRef};
|
|||
use crate::html::Markup;
|
||||
use crate::response::fatal_error::FatalError;
|
||||
use crate::response::page::ResultPage;
|
||||
use crate::{config, define_locale, locale, server, trace, LazyStatic};
|
||||
use crate::{config, locale, server, trace, LazyStatic};
|
||||
|
||||
#[cfg(feature = "database")]
|
||||
use crate::db;
|
||||
|
|
@ -21,8 +21,6 @@ use std::io::Error;
|
|||
|
||||
use substring::Substring;
|
||||
|
||||
define_locale!(LOCALE_PAGETOP, "static/locales");
|
||||
|
||||
pub struct Application {
|
||||
server: Server,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
use crate::app::LOCALE_PAGETOP;
|
||||
use crate::base::component::L10n;
|
||||
use crate::config;
|
||||
use crate::core::component::{ComponentTrait, RenderContext};
|
||||
use crate::core::module::ModuleTrait;
|
||||
use crate::html::{html, Favicon, Markup};
|
||||
use crate::response::page::Page;
|
||||
use crate::{config, LOCALE_PAGETOP};
|
||||
|
||||
pub type ThemeStaticRef = &'static dyn ThemeTrait;
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@ pub type HashMapResources = std::collections::HashMap<&'static str, StaticResour
|
|||
|
||||
pub type Handle = u64;
|
||||
|
||||
define_locale!(LOCALE_PAGETOP, "static/locales");
|
||||
|
||||
// *************************************************************************************************
|
||||
// APIs PÚBLICAS.
|
||||
// *************************************************************************************************
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
//! **PageTop**.
|
||||
|
||||
// Re-exports.
|
||||
pub use crate::{concat_string, fn_builder, paste, Handle, HashMapResources, LazyStatic, ResultExt};
|
||||
pub use crate::{
|
||||
concat_string, fn_builder, paste, Handle, HashMapResources, LazyStatic, ResultExt,
|
||||
};
|
||||
|
||||
// Macros declarativas globales.
|
||||
pub use crate::{args, define_config, define_handle, define_locale, serve_static_files};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue