iced-yoda/native/src/widget
Héctor Ramón Jiménez d7a5e54455 Require Clone for Message early when needed
Prior to this change, the widgets that needed a `Clone` bound on `Message` to
implement the `Widget` trait could be created with a non-cloneable `Message`.

As a consequence, the compiler complained only when actually trying to use the
`Widget` trait. Normally, this happens when trying to `push` the widget in a
container or turn it into an `Element`.

Furthermore, the compiler error in this case does not mention `Message` nor the
`Clone` bound, but instead complains about a missing `From` implementation.
Thus, it can easily cause confusion!

This change introduces `Clone` bounds in the main implementation of the
widgets that need it to properly implement the `Widget` trait. As a
result, the compiler complains early when trying to create one of these widgets
with a non-cloneable `Message` and explicitly mentions that the `Message` needs
to implement `Clone`.
2020-10-17 08:10:30 +02:00
..
pane_grid Implement hash_layout for pane_grid::TitleBar 2020-08-19 02:03:21 +02:00
text_input Remove redundant min checks in Editor 2020-07-11 00:11:45 +02:00
button.rs Require Clone for Message early when needed 2020-10-17 08:10:30 +02:00
checkbox.rs Fix Widget::layout for Checkbox 2020-07-28 08:23:44 +02:00
column.rs Fix typo in Row's and Column's hash_layout 2020-10-13 20:48:53 +02:00
container.rs Remove unnecessary lifetime in Widget trait 2020-07-10 02:01:30 +02:00
image.rs Remove unnecessary lifetime in Widget trait 2020-07-10 02:01:30 +02:00
pane_grid.rs Avoid PaneGrid unfocus when cursor is unavailable 2020-07-23 04:44:35 +02:00
pick_list.rs Avoid PaneGrid unfocus when cursor is unavailable 2020-07-23 04:44:35 +02:00
progress_bar.rs Remove unnecessary lifetime in Widget trait 2020-07-10 02:01:30 +02:00
radio.rs Require Clone for Message early when needed 2020-10-17 08:10:30 +02:00
row.rs Fix typo in Row's and Column's hash_layout 2020-10-13 20:48:53 +02:00
rule.rs widget Rule added 2020-08-22 21:23:27 +02:00
scrollable.rs Remove unnecessary lifetime in Widget trait 2020-07-10 02:01:30 +02:00
slider.rs Require Clone for Message early when needed 2020-10-17 08:10:30 +02:00
space.rs Remove unnecessary lifetime in Widget trait 2020-07-10 02:01:30 +02:00
svg.rs Remove unnecessary lifetime in Widget trait 2020-07-10 02:01:30 +02:00
text.rs Remove unnecessary lifetime in Widget trait 2020-07-10 02:01:30 +02:00
text_input.rs Require Clone for Message early when needed 2020-10-17 08:10:30 +02:00