From fbfa5543837c69c47c88e6a1c2ed5bbd3d4112f4 Mon Sep 17 00:00:00 2001
From: licunlong <licunlong1@huawei.com>
Date: Wed, 28 Jun 2023 16:43:04 +0800
Subject: [PATCH] typo: declure -> declare

---
 coms/service/src/manager.rs       | 4 ++--
 coms/service/src/unit.rs          | 4 ++--
 coms/target/src/manager.rs        | 4 ++--
 coms/target/src/unit.rs           | 4 ++--
 core/bin/plugin/mod.rs            | 8 ++++----
 core/lib/unit/base.rs             | 2 +-
 core/lib/unit/umif.rs             | 2 +-
 12 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/coms/service/src/manager.rs b/coms/service/src/manager.rs
index ebcab59..026f710 100644
--- a/coms/service/src/manager.rs
+++ b/coms/service/src/manager.rs
@@ -60,5 +60,5 @@ impl Default for ServiceManager {
     }
 }
 
-use sysmaster::declure_umobj_plugin;
-declure_umobj_plugin!(ServiceManager, ServiceManager::default, PLUGIN_NAME);
+use sysmaster::declare_umobj_plugin;
+declare_umobj_plugin!(ServiceManager, ServiceManager::default, PLUGIN_NAME);
diff --git a/coms/service/src/unit.rs b/coms/service/src/unit.rs
index 2a217d4..4bb235e 100644
--- a/coms/service/src/unit.rs
+++ b/coms/service/src/unit.rs
@@ -411,5 +411,5 @@ impl ServiceUnit {
     }
 }*/
 
-use sysmaster::declure_unitobj_plugin_with_param;
-declure_unitobj_plugin_with_param!(ServiceUnit, ServiceUnit::new);
+use sysmaster::declare_unitobj_plugin_with_param;
+declare_unitobj_plugin_with_param!(ServiceUnit, ServiceUnit::new);
diff --git a/coms/target/src/manager.rs b/coms/target/src/manager.rs
index e3c3975..832037c 100644
--- a/coms/target/src/manager.rs
+++ b/coms/target/src/manager.rs
@@ -53,5 +53,5 @@ impl UnitMngUtil for TargetManager {
     }
 }
 
-use sysmaster::declure_umobj_plugin;
-declure_umobj_plugin!(TargetManager, TargetManager::new, PLUGIN_NAME);
+use sysmaster::declare_umobj_plugin;
+declare_umobj_plugin!(TargetManager, TargetManager::new, PLUGIN_NAME);
diff --git a/coms/target/src/unit.rs b/coms/target/src/unit.rs
index bcd97c7..4914eec 100644
--- a/coms/target/src/unit.rs
+++ b/coms/target/src/unit.rs
@@ -190,5 +190,5 @@ impl UnitMngUtil for Target {
     }
 }*/
 
-use sysmaster::declure_unitobj_plugin_with_param;
-declure_unitobj_plugin_with_param!(Target, Target::new);
+use sysmaster::declare_unitobj_plugin_with_param;
+declare_unitobj_plugin_with_param!(Target, Target::new);
diff --git a/core/bin/plugin/mod.rs b/core/bin/plugin/mod.rs
index 869f360..9a8e4f6 100644
--- a/core/bin/plugin/mod.rs
+++ b/core/bin/plugin/mod.rs
@@ -34,8 +34,8 @@
 //! ```macro_rules
 //! const LOG_LEVEL: u32 = 4;
 //! const PLUGIN_NAME: &str = "TargetUnit";
-//! use sysmaster::declure_unitobj_plugin;
-//! declure_unitobj_plugin!(Target, Target::default, PLUGIN_NAME, LOG_LEVEL);
+//! use sysmaster::declare_unitobj_plugin;
+//! declare_unitobj_plugin!(Target, Target::default, PLUGIN_NAME, LOG_LEVEL);
 //! ````
 //! plugin or find the corresponding so according to the name of the corresponding unit configuration file, and load it dynamically, such as XXX.service to find libservice.so, XXX.socket to find libsocket.so
 //!
@@ -435,7 +435,7 @@ impl Plugin {
     }
 
     /// Create the subunit trait of unit
-    /// each sub unit need reference of declure_unitobj_plugin_with_param
+    /// each sub unit need reference of declare_unitobj_plugin_with_param
     ///
     pub fn create_subunit_with_um(
         &self,
@@ -474,7 +474,7 @@ impl Plugin {
         Ok(unsafe { Box::from_raw(boxed_raw) })
     }
     /// Create a  obj for subclasses of unit manager
-    /// each sub unit manager need reference of declure_umobj_plugin
+    /// each sub unit manager need reference of declare_umobj_plugin
     pub fn create_um_obj(
         &self,
         unit_type: UnitType,
diff --git a/core/lib/unit/base.rs b/core/lib/unit/base.rs
index 20f8c91..5550252 100644
--- a/core/lib/unit/base.rs
+++ b/core/lib/unit/base.rs
@@ -172,7 +172,7 @@ pub trait SubUnit: ReStation + UnitMngUtil {
 /// the macro for create a sub unit instance with dyn ref of UmIf,
 /// which sub unit wants invoke um interface, about UmIf see doc of UmIf
 #[macro_export]
-macro_rules! declure_unitobj_plugin_with_param {
+macro_rules! declare_unitobj_plugin_with_param {
     ($unit_type:ty, $constructor:path) => {
         use log::LevelFilter;
         /// method for create the unit instance
diff --git a/core/lib/unit/umif.rs b/core/lib/unit/umif.rs
index 18616f5..85603fa 100644
--- a/core/lib/unit/umif.rs
+++ b/core/lib/unit/umif.rs
@@ -222,7 +222,7 @@ pub trait UnitManagerObj: UnitMngUtil + ReStation {
 /// #[macro_use]
 /// the macro for create a sub unit-manager instance
 #[macro_export]
-macro_rules! declure_umobj_plugin {
+macro_rules! declare_umobj_plugin {
     ($unit_type:ty, $constructor:path, $name:expr) => {
         // method for create the sub-unit-manager instance
         use log::LevelFilter;
-- 
2.33.0

