From 62c104dbbea8cecabc604aeda7a94c5ba8588815 Mon Sep 17 00:00:00 2001 From: bbb651 Date: Mon, 14 Aug 2023 16:53:31 +0300 Subject: [PATCH 1/2] Fix selection_list feature flag being on an import --- src/native/helpers.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/native/helpers.rs b/src/native/helpers.rs index 7a50e0b2..31bd70ec 100644 --- a/src/native/helpers.rs +++ b/src/native/helpers.rs @@ -5,7 +5,7 @@ #[allow(unused_imports)] use iced_widget::core::{self, Color, Element}; #[allow(unused_imports)] -use std::{borrow::Cow, hash::Hash}; +use std::{borrow::Cow, hash::Hash, fmt::Display}; /// Creates a [`Grid`] with the given children. /// @@ -298,7 +298,6 @@ where } #[cfg(feature = "selection_list")] -use std::fmt::Display; /// Shortcut helper to create a [`SelectionList`] Widget. /// /// [`SelectionList`]: crate::SelectionList From 56e193824c423294be215d6418e7c63d904c0a8f Mon Sep 17 00:00:00 2001 From: bbb651 Date: Mon, 14 Aug 2023 16:55:27 +0300 Subject: [PATCH 2/2] Fixed {horizontal,vertical}_wrap! using wrong path --- src/native/helpers.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/native/helpers.rs b/src/native/helpers.rs index 31bd70ec..be02fcd9 100644 --- a/src/native/helpers.rs +++ b/src/native/helpers.rs @@ -28,10 +28,10 @@ macro_rules! grid { #[macro_export] macro_rules! wrap_horizontal { () => ( - $crate::wrap::new() + $crate::Wrap::new() ); ($($x:expr),+ $(,)?) => ( - $crate::Grid::with_elements(vec![$($crate::Element::from($x)),+]) + $crate::Wrap::with_elements(vec![$($crate::Element::from($x)),+]) ); } @@ -42,10 +42,10 @@ macro_rules! wrap_horizontal { #[macro_export] macro_rules! wrap_vertical { () => ( - $crate::wrap::new_vertical() + $crate::Wrap::new_vertical() ); ($($x:expr),+ $(,)?) => ( - $crate::wrap::with_elements_vertical(vec![$($crate::Element::from($x)),+]) + $crate::Wrap::with_elements_vertical(vec![$($crate::Element::from($x)),+]) ); }