fix(generic): edit trait bound IntoIterator type Item

This commit is contained in:
doryan 2024-08-17 21:40:07 +04:00
parent ac650c3678
commit 9d42c56423

View File

@ -54,10 +54,10 @@ where
&self.actions_group.0 &self.actions_group.0
} }
pub fn append_items<Iterable, F>(&self, items: Iterable) pub fn append_items<F, I>(&self, items: I)
where where
Iterable: IntoIterator<Item = (F, &'static str, &'static str)>,
F: Fn(&SimpleAction, Option<&Variant>) + 'static, F: Fn(&SimpleAction, Option<&Variant>) + 'static,
I: IntoIterator<Item = &'static (F, &'static str, &'static str)>,
{ {
for (callback, action_name, action_label) in items { for (callback, action_name, action_label) in items {
let action = ActionEntry::<SimpleActionGroup>::builder(action_name) let action = ActionEntry::<SimpleActionGroup>::builder(action_name)