From 3d86115f97b4581d567ce6c04a062a31a3efe027 Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Mon, 14 Aug 2023 23:29:23 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Generalize=20crate=20scope=20han?= =?UTF-8?q?dle=20creation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagetop/src/core/component.rs | 4 ++-- pagetop/src/response/page/action/after_prepare_body.rs | 2 +- pagetop/src/response/page/action/before_prepare_body.rs | 2 +- pagetop/src/util.rs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pagetop/src/core/component.rs b/pagetop/src/core/component.rs index d46f4786..179514d9 100644 --- a/pagetop/src/core/component.rs +++ b/pagetop/src/core/component.rs @@ -32,7 +32,7 @@ macro_rules! actions_for_component { // ACTION BEFORE PREPARE COMPONENT // ************************************************************************************* - $crate::new_handle!([] for Action); + $crate::new_handle!([] for Crate); pub struct [] { action: Option<[]>, @@ -91,7 +91,7 @@ macro_rules! actions_for_component { // ACTION AFTER PREPARE COMPONENT // ************************************************************************************* - $crate::new_handle!([] for Action); + $crate::new_handle!([] for Crate); pub struct [] { action: Option<[]>, diff --git a/pagetop/src/response/page/action/after_prepare_body.rs b/pagetop/src/response/page/action/after_prepare_body.rs index 457a17db..c93711ba 100644 --- a/pagetop/src/response/page/action/after_prepare_body.rs +++ b/pagetop/src/response/page/action/after_prepare_body.rs @@ -3,7 +3,7 @@ use crate::response::page::action::FnActionPage; use crate::response::page::Page; use crate::{new_handle, Handle, Weight}; -new_handle!(ACTION_AFTER_PREPARE_BODY for Action); +new_handle!(ACTION_AFTER_PREPARE_BODY for Crate); pub struct ActionAfterPrepareBody { action: Option, diff --git a/pagetop/src/response/page/action/before_prepare_body.rs b/pagetop/src/response/page/action/before_prepare_body.rs index e5622567..78e5ebe6 100644 --- a/pagetop/src/response/page/action/before_prepare_body.rs +++ b/pagetop/src/response/page/action/before_prepare_body.rs @@ -3,7 +3,7 @@ use crate::response::page::action::FnActionPage; use crate::response::page::Page; use crate::{new_handle, Handle, Weight}; -new_handle!(ACTION_BEFORE_PREPARE_BODY for Action); +new_handle!(ACTION_BEFORE_PREPARE_BODY for Crate); pub struct ActionBeforePrepareBody { action: Option, diff --git a/pagetop/src/util.rs b/pagetop/src/util.rs index ef9dc818..b757d1d1 100644 --- a/pagetop/src/util.rs +++ b/pagetop/src/util.rs @@ -112,8 +112,8 @@ macro_rules! new_handle { pub const $HANDLE: $crate::Handle = $crate::util::handle(module_path!(), file!(), line!(), column!()); }; - ( $HANDLE:ident for Action ) => { - /// Constant handle to represent a unique PageTop action. + ( $HANDLE:ident for Crate ) => { + /// Local constant handle to represent a unique PageTop building element. pub(crate) const $HANDLE: $crate::Handle = $crate::util::handle(module_path!(), file!(), line!(), column!()); };