diff options
| author | lukeflo | 2024-11-06 21:23:37 +0100 |
|---|---|---|
| committer | lukeflo | 2024-11-06 21:23:37 +0100 |
| commit | 910b9aaa1b892555548a9b280a349b53b7cde770 (patch) | |
| tree | 20edfbe3f1439590d9c468c02d9048dbd20ebaed /src | |
| parent | e1923e83711f6d06e994167a83155fbcdd80cd80 (diff) | |
| download | bibiman-910b9aaa1b892555548a9b280a349b53b7cde770.tar.gz bibiman-910b9aaa1b892555548a9b280a349b53b7cde770.zip | |
remove unneccessary TagListItem struct
Diffstat (limited to 'src')
| -rw-r--r-- | src/bibiman.rs | 1 | ||||
| -rw-r--r-- | src/bibiman/keywords.rs | 15 | ||||
| -rw-r--r-- | src/tui/ui.rs | 8 |
3 files changed, 0 insertions, 24 deletions
diff --git a/src/bibiman.rs b/src/bibiman.rs index ca6900a..3dcf732 100644 --- a/src/bibiman.rs +++ b/src/bibiman.rs @@ -94,7 +94,6 @@ impl Bibiman { pub fn update_lists(&mut self) { self.main_biblio = BibiSetup::new(&self.main_bibfile); - // self.tag_list = TagList::from_iter(self.main_biblio.keyword_list.clone()); self.tag_list = TagList::new(self.main_biblio.keyword_list.clone()); self.entry_table = EntryTable::new(&self.main_biblio.entry_list); } diff --git a/src/bibiman/keywords.rs b/src/bibiman/keywords.rs index 9f1d7d3..ce431ec 100644 --- a/src/bibiman/keywords.rs +++ b/src/bibiman/keywords.rs @@ -26,21 +26,6 @@ pub struct TagList { pub selected_keywords: Vec<String>, } -// Structure of the list items. -#[derive(Debug)] -pub struct TagListItem { - pub keyword: String, -} - -// Function to process inputed characters and convert them (to string, or more complex function) -impl TagListItem { - pub fn new(info: &str) -> Self { - Self { - keyword: info.to_string(), - } - } -} - impl TagList { pub fn new(keyword_list: Vec<String>) -> Self { let tag_list_items = keyword_list; diff --git a/src/tui/ui.rs b/src/tui/ui.rs index 7ee6670..be8eae6 100644 --- a/src/tui/ui.rs +++ b/src/tui/ui.rs @@ -16,7 +16,6 @@ ///// use crate::bibiman::entries::EntryTableColumn; -use crate::bibiman::keywords::TagListItem; use crate::bibiman::{CurrentArea, FormerArea}; use crate::App; use ratatui::layout::{Direction, Position}; @@ -77,13 +76,6 @@ pub const fn alternate_colors(i: usize) -> Color { } } -impl From<&TagListItem> for ListItem<'_> { - fn from(value: &TagListItem) -> Self { - let line = Line::styled(format!("{}", value.keyword), TEXT_FG_COLOR); - ListItem::new(line) - } -} - pub fn render_ui(app: &mut App, frame: &mut Frame) { let [header_area, main_area, footer_area] = Layout::new( Direction::Vertical, |
