1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00
This commit is contained in:
mat 2022-02-02 07:57:50 -06:00
parent d9e52f8d96
commit 1b88888151
2 changed files with 6 additions and 9 deletions

View file

@ -45,14 +45,11 @@ pub struct CommandContextBuilder<'a, S> {
// this.range = StringRange.at(start);
// }
impl<S> CommandContextBuilder<'_, S>
where
,
{
impl<S> CommandContextBuilder<'_, S> {
pub fn new(
dispatcher: CommandDispatcher<S>,
source: S,
root_node: dyn CommandNodeTrait<S>,
root_node: &dyn CommandNodeTrait<S>,
start: usize,
) -> Self {
Self {

View file

@ -21,14 +21,14 @@ enum CommandNodeEnum<'a, S> {
Root(RootCommandNode<'a, S>),
}
impl<S> Deref for CommandNodeEnum<'_, S> {
impl<'a, S> Deref for CommandNodeEnum<'a, S> {
type Target = dyn CommandNodeTrait<S>;
fn deref(&self) -> &Self::Target {
match self {
CommandNodeEnum::Literal(node) => node,
CommandNodeEnum::Argument(node) => node,
CommandNodeEnum::Root(node) => node,
CommandNodeEnum::Literal(node) => *node as &Self::Target,
CommandNodeEnum::Argument(node) => *node as &Self::Target,
CommandNodeEnum::Root(node) => *node as &Self::Target,
}
}
}