chore(table): format code

This commit is contained in:
Michael Aaron Murphy 2025-03-26 16:32:33 +01:00 committed by Michael Murphy
parent 61c0fc7543
commit 8bce57ed83
5 changed files with 13 additions and 13 deletions

View file

@ -3,10 +3,10 @@
pub mod model;
pub use model::{
Entity, Model,
category::ItemCategory,
category::ItemInterface,
selection::{MultiSelect, SingleSelect},
Entity, Model,
};
pub mod widget;
pub use widget::compact::CompactTableView;

View file

@ -4,8 +4,8 @@
use slotmap::{SecondaryMap, SparseSecondaryMap};
use super::{
category::{ItemCategory, ItemInterface},
Entity, Model, Selectable,
category::{ItemCategory, ItemInterface},
};
/// A newly-inserted item which may have additional actions applied to it.

View file

@ -4,8 +4,8 @@
//! Describes logic specific to the single-select and multi-select modes of a model.
use super::{
category::{ItemCategory, ItemInterface},
Entity, Model,
category::{ItemCategory, ItemInterface},
};
use std::collections::HashSet;

View file

@ -1,14 +1,13 @@
use derive_setters::Setters;
use crate::widget::table::model::{
Entity, Model,
category::{ItemCategory, ItemInterface},
selection::Selectable,
Entity, Model,
};
use crate::{
theme,
Apply, Element, theme,
widget::{self, container, menu},
Apply, Element,
};
use iced::{Alignment, Border, Padding};

View file

@ -1,14 +1,13 @@
use derive_setters::Setters;
use crate::widget::table::model::{
Entity, Model,
category::{ItemCategory, ItemInterface},
selection::Selectable,
Entity, Model,
};
use crate::{
theme,
Apply, Element, theme,
widget::{self, container, divider, menu},
Apply, Element,
};
use iced::{Alignment, Border, Length, Padding};
@ -132,10 +131,12 @@ where
.apply(Element::from);
// Build the items
let items_full = if val.model.items.is_empty() {
vec![divider::horizontal::default()
.apply(container)
.padding(val.divider_padding)
.apply(Element::from)]
vec![
divider::horizontal::default()
.apply(container)
.padding(val.divider_padding)
.apply(Element::from),
]
} else {
val.model
.iter()