Take Into<Handle> in image::allocate
This commit is contained in:
parent
0001b18408
commit
c0fb3ea9e8
1 changed files with 2 additions and 2 deletions
|
|
@ -17,8 +17,8 @@ pub enum Action {
|
||||||
/// When you obtain an [`Allocation`] explicitly, you get the guarantee
|
/// When you obtain an [`Allocation`] explicitly, you get the guarantee
|
||||||
/// that using a [`Handle`] will draw the corresponding image immediately
|
/// that using a [`Handle`] will draw the corresponding image immediately
|
||||||
/// in the next frame.
|
/// in the next frame.
|
||||||
pub fn allocate(handle: Handle) -> Task<Allocation> {
|
pub fn allocate(handle: impl Into<Handle>) -> Task<Allocation> {
|
||||||
task::oneshot(|sender| {
|
task::oneshot(|sender| {
|
||||||
crate::Action::Image(Action::Allocate(handle, sender))
|
crate::Action::Image(Action::Allocate(handle.into(), sender))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue