specify ResolveValue in recursive resolve call
This commit is contained in:
parent
684895a554
commit
1aed17fa30
@ -196,7 +196,7 @@ impl ResolveValue for KeyboardDefinition {
|
|||||||
match self {
|
match self {
|
||||||
KeyboardDefinition::Rows(rows) => rows.into_iter().map(|r| r.resolve(runner)).collect(),
|
KeyboardDefinition::Rows(rows) => rows.into_iter().map(|r| r.resolve(runner)).collect(),
|
||||||
KeyboardDefinition::Function(f) => {
|
KeyboardDefinition::Function(f) => {
|
||||||
Self::resolve(f.call_context(runner)?.js_into()?, runner)
|
<Self as ResolveValue>::resolve(f.call_context(runner)?.js_into()?, runner)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -217,7 +217,9 @@ impl ResolveValue for RowDefinition {
|
|||||||
RowDefinition::Buttons(buttons) => {
|
RowDefinition::Buttons(buttons) => {
|
||||||
buttons.into_iter().map(|b| b.resolve(runner)).collect()
|
buttons.into_iter().map(|b| b.resolve(runner)).collect()
|
||||||
}
|
}
|
||||||
RowDefinition::Function(f) => Self::resolve(f.call_context(runner)?.js_into()?, runner),
|
RowDefinition::Function(f) => {
|
||||||
|
<Self as ResolveValue>::resolve(f.call_context(runner)?.js_into()?, runner)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -238,7 +240,7 @@ impl ResolveValue for ButtonDefinition {
|
|||||||
ButtonDefinition::Button(button) => Ok(button),
|
ButtonDefinition::Button(button) => Ok(button),
|
||||||
ButtonDefinition::ButtonLiteral(l) => Ok(ButtonRaw::from_literal(l)),
|
ButtonDefinition::ButtonLiteral(l) => Ok(ButtonRaw::from_literal(l)),
|
||||||
ButtonDefinition::Function(f) => {
|
ButtonDefinition::Function(f) => {
|
||||||
Self::resolve(f.call_context(runner)?.js_into()?, runner)
|
<Self as ResolveValue>::resolve(f.call_context(runner)?.js_into()?, runner)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user