Unbox one of 'factory' closures on `UntypedActionSupport`
This commit is contained in:
parent
bfaba3d968
commit
628eedd88c
|
|
@ -169,7 +169,7 @@ pub struct UntypedActionSupport {
|
||||||
pub(crate) destructure_goal_response_msg:
|
pub(crate) destructure_goal_response_msg:
|
||||||
Box<dyn Fn(WrappedNativeMsgUntyped) -> (bool, builtin_interfaces::msg::Time)>,
|
Box<dyn Fn(WrappedNativeMsgUntyped) -> (bool, builtin_interfaces::msg::Time)>,
|
||||||
|
|
||||||
pub(crate) make_feedback_msg: Box<dyn Fn() -> WrappedNativeMsgUntyped>,
|
pub(crate) make_feedback_msg: fn() -> WrappedNativeMsgUntyped,
|
||||||
pub(crate) destructure_feedback_msg: Box<
|
pub(crate) destructure_feedback_msg: Box<
|
||||||
dyn Fn(
|
dyn Fn(
|
||||||
WrappedNativeMsgUntyped,
|
WrappedNativeMsgUntyped,
|
||||||
|
|
@ -186,7 +186,7 @@ pub struct UntypedActionSupport {
|
||||||
impl UntypedActionSupport {
|
impl UntypedActionSupport {
|
||||||
fn new<T>() -> Self
|
fn new<T>() -> Self
|
||||||
where
|
where
|
||||||
T: WrappedActionTypeSupport + 'static,
|
T: WrappedActionTypeSupport,
|
||||||
{
|
{
|
||||||
// TODO: this is terrible. These closures perform json (de)serialization just to move the data.
|
// TODO: this is terrible. These closures perform json (de)serialization just to move the data.
|
||||||
// FIX.
|
// FIX.
|
||||||
|
|
@ -220,7 +220,7 @@ impl UntypedActionSupport {
|
||||||
T::destructure_goal_response_msg(msg)
|
T::destructure_goal_response_msg(msg)
|
||||||
});
|
});
|
||||||
|
|
||||||
let make_feedback_msg = Box::new(WrappedNativeMsgUntyped::new::<T::FeedbackMessage>);
|
let make_feedback_msg = WrappedNativeMsgUntyped::new::<T::FeedbackMessage>;
|
||||||
|
|
||||||
let destructure_feedback_msg = Box::new(|msg: WrappedNativeMsgUntyped| {
|
let destructure_feedback_msg = Box::new(|msg: WrappedNativeMsgUntyped| {
|
||||||
let msg = unsafe {
|
let msg = unsafe {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue