Skip to content

Commit

Permalink
test with impl into instead of generic type
Browse files Browse the repository at this point in the history
  • Loading branch information
wiiznokes committed Jul 31, 2023
1 parent d2c2e61 commit b18ec73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/native/modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ where
/// * the underlay [`Element`] on which this [`Modal`](Modal)
/// will be wrapped around.
/// * the content [`Element`] of the [`Modal`](Modal).
pub fn new<U, C>(show_modal: bool, underlay: U, content: C) -> Self
where
U: Into<Element<'a, Message, Renderer>>,
C: Into<Element<'a, Message, Renderer>>,
{
pub fn new(
show_modal: bool,
underlay: impl Into<Element<'a, Message, Renderer>>,
content: impl Into<Element<'a, Message, Renderer>>,
) -> Self {
Modal {
show_modal,
underlay: underlay.into(),
Expand Down
4 changes: 1 addition & 3 deletions src/native/overlay/modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
//!
//! *This API requires the following crate features to be activated: modal*
use iced_widget::core::{
self,
alignment,
event, keyboard, layout,
self, alignment, event, keyboard, layout,
mouse::{self, Cursor},
renderer, touch,
widget::Tree,
Expand Down

0 comments on commit b18ec73

Please sign in to comment.