diff --git a/pagetop/src/core/action.rs b/pagetop/src/core/action.rs index 0885c80a..c257973a 100644 --- a/pagetop/src/core/action.rs +++ b/pagetop/src/core/action.rs @@ -1,5 +1,5 @@ mod definition; -pub use definition::{action_ref, ActionTrait, BaseAction}; +pub use definition::{action_ref, ActionBase, ActionTrait}; mod list; pub use list::Action; diff --git a/pagetop/src/core/action/definition.rs b/pagetop/src/core/action/definition.rs index b302c797..ad46f11b 100644 --- a/pagetop/src/core/action/definition.rs +++ b/pagetop/src/core/action/definition.rs @@ -2,11 +2,11 @@ use crate::{Handle, Weight}; use std::any::Any; -pub trait BaseAction: Any { +pub trait ActionBase: Any { fn as_ref_any(&self) -> &dyn Any; } -pub trait ActionTrait: BaseAction + Send + Sync { +pub trait ActionTrait: ActionBase + Send + Sync { fn new() -> Self where Self: Sized; @@ -18,7 +18,7 @@ pub trait ActionTrait: BaseAction + Send + Sync { } } -impl BaseAction for C { +impl ActionBase for C { fn as_ref_any(&self) -> &dyn Any { self } diff --git a/pagetop/src/core/module.rs b/pagetop/src/core/module.rs index 0ecfbc65..3bfd99c8 100644 --- a/pagetop/src/core/module.rs +++ b/pagetop/src/core/module.rs @@ -1,4 +1,4 @@ mod definition; -pub use definition::{BaseModule, ModuleStaticRef, ModuleTrait}; +pub use definition::{ModuleBase, ModuleStaticRef, ModuleTrait}; pub(crate) mod all; diff --git a/pagetop/src/core/module/definition.rs b/pagetop/src/core/module/definition.rs index bd62c9bd..ab405d80 100644 --- a/pagetop/src/core/module/definition.rs +++ b/pagetop/src/core/module/definition.rs @@ -8,12 +8,12 @@ use crate::db::MigrationItem; pub type ModuleStaticRef = &'static dyn ModuleTrait; -pub trait BaseModule { +pub trait ModuleBase { fn single_name(&self) -> &'static str; } /// Los módulos deben implementar este *trait*. -pub trait ModuleTrait: BaseModule + Send + Sync { +pub trait ModuleTrait: ModuleBase + Send + Sync { fn handle(&self) -> Handle; fn name(&self) -> L10n { @@ -52,7 +52,7 @@ pub trait ModuleTrait: BaseModule + Send + Sync { fn configure_service(&self, cfg: &mut service::web::ServiceConfig) {} } -impl BaseModule for M { +impl ModuleBase for M { fn single_name(&self) -> &'static str { util::single_type_name::() }