add value bar

This commit is contained in:
🪞👃🪞 2025-03-23 23:10:04 +02:00
parent 2ebf2c6cef
commit 41b6a0cd57
6 changed files with 64 additions and 39 deletions

View file

@ -8,6 +8,7 @@ pub struct Column<T, G, S> {
pub width: usize,
pub getter: G,
pub setter: Option<S>,
//pub styler: Option<U>,
}
impl<T> Column<T, fn(&T)->Option<Arc<str>>, fn(&mut [T], usize, &str)> {
@ -33,7 +34,7 @@ impl<T> Column<T, fn(&T)->Option<Arc<str>>, fn(&mut [T], usize, &str)> {
macro_rules! setter {
($method:ident) => {
|entries: &mut [Entry], index: usize, value: &str|{
if let Some(entries) = paths_under(entries, index) {
if let Some(entries) = entries_under(entries, index) {
for entry in entries.iter() {
entry.write().unwrap().$method(&value);
}