mirror of
https://codeberg.org/unspeaker/perch.git
synced 2025-12-07 01:56:45 +01:00
fix all warns, remove moku, bind edit keys
This commit is contained in:
parent
41c5686d67
commit
2903d58b2d
6 changed files with 39 additions and 81 deletions
|
|
@ -1,17 +1,16 @@
|
|||
use crate::*;
|
||||
use walkdir::DirEntry;
|
||||
use id3::{Tag, TagLike};
|
||||
use std::io::Read;
|
||||
|
||||
pub struct Taggart {
|
||||
pub root: PathBuf,
|
||||
pub _root: PathBuf,
|
||||
pub paths: Vec<Entry>,
|
||||
pub cursor: usize,
|
||||
pub offset: usize,
|
||||
pub column: usize,
|
||||
pub columns: Columns<Entry>,
|
||||
pub size: Measure<TuiOut>,
|
||||
pub editing: Option<(usize, usize)>,
|
||||
pub editing: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Ord, Eq, PartialEq, PartialOrd)]
|
||||
|
|
@ -120,9 +119,6 @@ impl Entry {
|
|||
},
|
||||
}))
|
||||
}
|
||||
pub fn short_path (&self, root: &impl AsRef<Path>) -> Usually<&Path> {
|
||||
Ok(self.path.strip_prefix(root.as_ref())?)
|
||||
}
|
||||
pub fn is_dir (&self) -> bool {
|
||||
matches!(self.info, EntryInfo::Directory { .. })
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue