aboutsummaryrefslogtreecommitdiff
path: root/mingling_core/src
diff options
context:
space:
mode:
Diffstat (limited to 'mingling_core/src')
-rw-r--r--mingling_core/src/comp.rs8
-rw-r--r--mingling_core/src/program.rs4
-rw-r--r--mingling_core/src/program/collection.rs4
-rw-r--r--mingling_core/src/program/collection/mock.rs2
-rw-r--r--mingling_core/src/program/exec.rs2
5 files changed, 10 insertions, 10 deletions
diff --git a/mingling_core/src/comp.rs b/mingling_core/src/comp.rs
index 4315854..aea46e1 100644
--- a/mingling_core/src/comp.rs
+++ b/mingling_core/src/comp.rs
@@ -198,8 +198,8 @@ impl CompletionHelper {
None
};
#[cfg(feature = "dispatch_tree")]
- let suggest = if let Ok(any) = P::dispatch_args_trie(&args) {
- debug!("dispatch_args_trie OK, member_id = {:?}", any.member_id);
+ let suggest = if let Ok(any) = P::dispatch_args(&args) {
+ debug!("dispatch_args OK, member_id = {:?}", any.member_id);
trace!("entry type: {}", any.member_id);
let entry_fallback = <P::EntryFallback as crate::Grouped<P>>::member_id();
@@ -215,7 +215,7 @@ impl CompletionHelper {
Some(result)
}
} else {
- debug!("dispatch_args_trie failed, args = {:?}", args);
+ debug!("dispatch_args failed, args = {:?}", args);
trace!("no dispatcher matched");
None
};
@@ -355,7 +355,7 @@ where
let words: Vec<String> = node.split(' ').map(str::to_string).collect();
#[cfg(feature = "dispatch_tree")]
- let lazy_member = P::dispatch_args_trie(&words).ok().map(|any| any.member_id);
+ let lazy_member = P::dispatch_args(&words).ok().map(|any| any.member_id);
#[cfg(not(feature = "dispatch_tree"))]
let lazy_member = match match_user_input(this::<P>(), &words) {
diff --git a/mingling_core/src/program.rs b/mingling_core/src/program.rs
index 86e3e83..7bafe72 100644
--- a/mingling_core/src/program.rs
+++ b/mingling_core/src/program.rs
@@ -207,12 +207,12 @@ where
/// Use a prefix tree to quickly match arguments and dispatch to an Entry
#[cfg(feature = "dispatch_tree")]
- pub fn dispatch_args_trie(
+ pub fn dispatch_args(
&'static self,
args: impl Into<StringVec>,
) -> Result<AnyOutput<C>, ChainProcessError> {
let string_vec: Vec<String> = args.into().into();
- match C::dispatch_args_trie(&string_vec) {
+ match C::dispatch_args(&string_vec) {
Ok(ok) => Ok(ok),
Err(e) => Err(e.into()),
}
diff --git a/mingling_core/src/program/collection.rs b/mingling_core/src/program/collection.rs
index 2b3e9ec..438b800 100644
--- a/mingling_core/src/program/collection.rs
+++ b/mingling_core/src/program/collection.rs
@@ -36,7 +36,7 @@ pub trait ProgramCollect {
/// Use a prefix tree to quickly match arguments and dispatch to an Entry
#[cfg(feature = "dispatch_tree")]
- fn dispatch_args_trie(
+ fn dispatch_args(
raw: &[String],
) -> Result<AnyOutput<Self::Enum>, crate::error::ProgramInternalExecuteError>;
@@ -46,7 +46,7 @@ pub trait ProgramCollect {
/// # Errors
///
/// Returns an error if the program fails to execute the given arguments.
- fn dispatch_args_trie(
+ fn dispatch_args(
_raw: &[String],
) -> Result<AnyOutput<Self::Enum>, crate::error::ProgramInternalExecuteError> {
unreachable!()
diff --git a/mingling_core/src/program/collection/mock.rs b/mingling_core/src/program/collection/mock.rs
index 6b4406e..662d8f2 100644
--- a/mingling_core/src/program/collection/mock.rs
+++ b/mingling_core/src/program/collection/mock.rs
@@ -75,7 +75,7 @@ impl ProgramCollect for MockProgramCollect {
type ResultEmpty = Self;
#[cfg(feature = "dispatch_tree")]
- fn dispatch_args_trie(
+ fn dispatch_args(
_raw: &[String],
) -> Result<AnyOutput<Self::Enum>, crate::error::ProgramInternalExecuteError> {
unreachable!()
diff --git a/mingling_core/src/program/exec.rs b/mingling_core/src/program/exec.rs
index b0a5b16..3ad5ba8 100644
--- a/mingling_core/src/program/exec.rs
+++ b/mingling_core/src/program/exec.rs
@@ -62,7 +62,7 @@ where
let mut current = if cfg!(not(feature = "dispatch_tree")) {
dispatch_args_dynamic(program, args)?
} else {
- C::dispatch_args_trie(args)?
+ C::dispatch_args(args)?
};
// Run hook