♻️ Revisa el uso de "util" en el código
This commit is contained in:
parent
35c221f1f8
commit
0d2a1b37c5
3 changed files with 6 additions and 8 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
use crate::core::component::RenderContext;
|
use crate::core::component::RenderContext;
|
||||||
use crate::html::{html, Markup};
|
use crate::html::{html, Markup};
|
||||||
use crate::util::single_type_name;
|
use crate::{define_handle, util, Handle};
|
||||||
use crate::{define_handle, Handle};
|
|
||||||
|
|
||||||
pub use std::any::Any as AnyComponent;
|
pub use std::any::Any as AnyComponent;
|
||||||
|
|
||||||
|
|
@ -21,7 +20,7 @@ pub trait ComponentTrait: AnyComponent + BaseComponent + Send + Sync {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn name(&self) -> String {
|
fn name(&self) -> String {
|
||||||
single_type_name::<Self>().to_owned()
|
util::single_type_name::<Self>().to_owned()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn description(&self) -> Option<String> {
|
fn description(&self) -> Option<String> {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
use crate::base::component::L10n;
|
use crate::base::component::L10n;
|
||||||
use crate::core::action::Action;
|
use crate::core::action::Action;
|
||||||
use crate::core::theme::ThemeStaticRef;
|
use crate::core::theme::ThemeStaticRef;
|
||||||
use crate::util::single_type_name;
|
use crate::{define_handle, server, util, Handle};
|
||||||
use crate::{define_handle, server, Handle};
|
|
||||||
|
|
||||||
#[cfg(feature = "database")]
|
#[cfg(feature = "database")]
|
||||||
use crate::db::MigrationItem;
|
use crate::db::MigrationItem;
|
||||||
|
|
@ -59,6 +58,6 @@ pub trait ModuleTrait: BaseModule + Send + Sync {
|
||||||
|
|
||||||
impl<M: ?Sized + ModuleTrait> BaseModule for M {
|
impl<M: ?Sized + ModuleTrait> BaseModule for M {
|
||||||
fn single_name(&self) -> &'static str {
|
fn single_name(&self) -> &'static str {
|
||||||
single_type_name::<Self>()
|
util::single_type_name::<Self>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
//! **PageTop**.
|
//! **PageTop**.
|
||||||
|
|
||||||
// Re-exports.
|
// Re-exports.
|
||||||
pub use crate::{concat_string, fn_builder, Handle, HashMapResources, LazyStatic, ResultExt};
|
pub use crate::{concat_string, fn_builder, paste, Handle, HashMapResources, LazyStatic, ResultExt};
|
||||||
|
|
||||||
// Macros declarativas globales.
|
// Macros declarativas globales.
|
||||||
pub use crate::{args, define_config, define_handle, define_locale, paste, serve_static_files};
|
pub use crate::{args, define_config, define_handle, define_locale, serve_static_files};
|
||||||
|
|
||||||
// Funciones útiles.
|
// Funciones útiles.
|
||||||
pub use crate::util;
|
pub use crate::util;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue