summaryrefslogtreecommitdiff
path: root/iced_builder/src/views/element_list.rs
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2024-12-24 00:44:27 +0100
committerpml68 <contact@pml68.dev>2024-12-24 00:44:36 +0100
commit699e380dd2d6ebf61849dba8c225b512e9fa816a (patch)
treec3f9e75c840ba4256917d705f565022274041213 /iced_builder/src/views/element_list.rs
parentrefactor: apply a few clippy suggestions (diff)
downloadiced-builder-699e380dd2d6ebf61849dba8c225b512e9fa816a.tar.gz
style: add `max_width=80` to rustfmt.toml
Diffstat (limited to 'iced_builder/src/views/element_list.rs')
-rw-r--r--iced_builder/src/views/element_list.rs19
1 files changed, 10 insertions, 9 deletions
diff --git a/iced_builder/src/views/element_list.rs b/iced_builder/src/views/element_list.rs
index 6e78ae0..0a75a93 100644
--- a/iced_builder/src/views/element_list.rs
+++ b/iced_builder/src/views/element_list.rs
@@ -1,10 +1,9 @@
+use iced::widget::{column, container, pane_grid, text, Column};
+use iced::{Alignment, Element, Length};
+use iced_drop::droppable;
+
use super::style;
use crate::types::{ElementName, Message};
-use iced::{
- widget::{column, container, pane_grid, text, Column},
- Alignment, Element, Length,
-};
-use iced_drop::droppable;
fn items_list_view<'a>(items: &'a Vec<ElementName>) -> Element<'a, Message> {
let mut column = Column::new()
@@ -13,10 +12,12 @@ fn items_list_view<'a>(items: &'a Vec<ElementName>) -> Element<'a, Message> {
.width(Length::Fill);
for item in items {
- column = column.push(
- droppable(text(item.clone().to_string()))
- .on_drop(move |point, rect| Message::DropNewElement(item.clone(), point, rect)),
- );
+ column =
+ column.push(droppable(text(item.clone().to_string())).on_drop(
+ move |point, rect| {
+ Message::DropNewElement(item.clone(), point, rect)
+ },
+ ));
}
container(column)