diff options
| author | lukeflo | 2025-01-29 21:04:49 +0100 |
|---|---|---|
| committer | lukeflo | 2025-01-29 21:04:49 +0100 |
| commit | dd108698cfbfda6ba251c75f821f7a4ede9b0608 (patch) | |
| tree | c7ac2d525f478d9f7ead65a48c148b7006603deb /src/bibiman.rs | |
| parent | fb34960e523b8f618fc4e024902f43928d8aa716 (diff) | |
| download | bibiman-dd108698cfbfda6ba251c75f821f7a4ede9b0608.tar.gz bibiman-dd108698cfbfda6ba251c75f821f7a4ede9b0608.zip | |
remove EntryTableItem struct, simply use BibiData
Diffstat (limited to 'src/bibiman.rs')
| -rw-r--r-- | src/bibiman.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bibiman.rs b/src/bibiman.rs index 9955896..ee769c4 100644 --- a/src/bibiman.rs +++ b/src/bibiman.rs @@ -59,7 +59,7 @@ pub enum FormerArea { // Application. #[derive(Debug)] -pub struct Bibiman<'a> { +pub struct Bibiman { // main bib file // pub main_bibfiles: Vec<PathBuf>, // main bibliography @@ -69,7 +69,7 @@ pub struct Bibiman<'a> { // tag list pub tag_list: TagList, // table items - pub entry_table: EntryTable<'a>, + pub entry_table: EntryTable, // scroll state info buffer pub scroll_info: u16, // area @@ -80,14 +80,14 @@ pub struct Bibiman<'a> { pub popup_area: PopupArea, } -impl Bibiman<'_> { +impl Bibiman { // Constructs a new instance of [`App`]. pub fn new(args: &CLIArgs) -> Result<Self> { // let main_bibfiles = args.fileargs.clone(); let main_biblio = BibiSetup::new(&args.files); let tag_list = TagList::new(main_biblio.keyword_list.clone()); let search_struct = BibiSearch::default(); - let entry_table = EntryTable::new(&main_biblio.entry_list); + let entry_table = EntryTable::new(main_biblio.entry_list.clone()); let current_area = CurrentArea::EntryArea; Ok(Self { // main_bibfiles, @@ -131,7 +131,7 @@ impl Bibiman<'_> { pub fn update_lists(&mut self, args: &CLIArgs) { self.main_biblio = BibiSetup::new(&args.files); self.tag_list = TagList::new(self.main_biblio.keyword_list.clone()); - self.entry_table = EntryTable::new(&self.main_biblio.entry_list); + self.entry_table = EntryTable::new(self.main_biblio.entry_list.clone()); } /// Toggle moveable list between entries and tags @@ -155,7 +155,7 @@ impl Bibiman<'_> { } pub fn reset_current_list(&mut self) { - self.entry_table = EntryTable::new(&self.main_biblio.entry_list); + self.entry_table = EntryTable::new(self.main_biblio.entry_list.clone()); self.tag_list = TagList::new(self.main_biblio.keyword_list.clone()); if let CurrentArea::TagArea = self.current_area { self.tag_list.tag_list_state.select(Some(0)) |
