Skip to content

Commit

Permalink
Don't require 'static child in dnd_destination_for_data
Browse files Browse the repository at this point in the history
Matches `dnd_destination`.
  • Loading branch information
ids1024 authored and jackpot51 committed Dec 20, 2024
1 parent aeb87f8 commit 75a11b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/widget/dnd_destination.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ pub fn dnd_destination<'a, Message: 'static>(
DndDestination::new(child, mimes)
}

pub fn dnd_destination_for_data<T: AllowedMimeTypes, Message: 'static>(
child: impl Into<Element<'static, Message>>,
pub fn dnd_destination_for_data<'a, T: AllowedMimeTypes, Message: 'static>(
child: impl Into<Element<'a, Message>>,
on_finish: impl Fn(Option<T>, DndAction) -> Message + 'static,
) -> DndDestination<'static, Message> {
) -> DndDestination<'a, Message> {
DndDestination::for_data(child, on_finish)
}

Expand Down

0 comments on commit 75a11b3

Please sign in to comment.