mirror of
https://github.com/Start9Labs/rpc-toolkit.git
synced 2026-03-30 12:21:58 +00:00
switch to ordmap for better cloning
This commit is contained in:
@@ -321,7 +321,7 @@ impl<'a> std::borrow::Borrow<Option<&'a str>> for Name {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub(crate) struct SubcommandMap(pub(crate) BTreeMap<Name, BTreeMap<Option<TypeId>, DynHandler>>);
|
pub(crate) struct SubcommandMap(pub(crate) OrdMap<Name, OrdMap<Option<TypeId>, DynHandler>>);
|
||||||
impl SubcommandMap {
|
impl SubcommandMap {
|
||||||
fn insert(
|
fn insert(
|
||||||
&mut self,
|
&mut self,
|
||||||
@@ -362,7 +362,7 @@ impl<Params, InheritedParams> ParentHandler<Params, InheritedParams> {
|
|||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self {
|
Self {
|
||||||
_phantom: PhantomData,
|
_phantom: PhantomData,
|
||||||
subcommands: SubcommandMap(BTreeMap::new()),
|
subcommands: SubcommandMap(OrdMap::new()),
|
||||||
metadata: OrdMap::new(),
|
metadata: OrdMap::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user