diff --git a/runtime/src/image.rs b/runtime/src/image.rs index d35f7006..2e2cfa69 100644 --- a/runtime/src/image.rs +++ b/runtime/src/image.rs @@ -17,8 +17,8 @@ pub enum Action { /// When you obtain an [`Allocation`] explicitly, you get the guarantee /// that using a [`Handle`] will draw the corresponding image immediately /// in the next frame. -pub fn allocate(handle: Handle) -> Task { +pub fn allocate(handle: impl Into) -> Task { task::oneshot(|sender| { - crate::Action::Image(Action::Allocate(handle, sender)) + crate::Action::Image(Action::Allocate(handle.into(), sender)) }) }