mirror of
https://github.com/Start9Labs/rpc-toolkit.git
synced 2026-03-26 02:11:56 +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)]
|
||||
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 {
|
||||
fn insert(
|
||||
&mut self,
|
||||
@@ -362,7 +362,7 @@ impl<Params, InheritedParams> ParentHandler<Params, InheritedParams> {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
_phantom: PhantomData,
|
||||
subcommands: SubcommandMap(BTreeMap::new()),
|
||||
subcommands: SubcommandMap(OrdMap::new()),
|
||||
metadata: OrdMap::new(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user