Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove unused fields #74

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ impl App {
])
.areas(area);

SearchPageWidget::new(self.mode).render(main, buf, &mut self.search);
SearchPageWidget.render(main, buf, &mut self.search);

self.render_prompt(prompt, buf);
self.render_status_bar(status_bar, buf);
Expand Down
8 changes: 1 addition & 7 deletions src/widgets/search_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,15 +439,9 @@ impl SearchPage {
}
}

pub struct SearchPageWidget {
pub mode: Mode,
}
pub struct SearchPageWidget;

impl SearchPageWidget {
pub fn new(mode: Mode) -> Self {
Self { mode }
}

fn render_crate_info(&self, area: Rect, buf: &mut Buffer, state: &mut SearchPage) {
if let Some(ci) = state.crate_response.lock().unwrap().clone() {
CrateInfoTableWidget::new(ci).render(area, buf, &mut state.crate_info);
Expand Down
1 change: 0 additions & 1 deletion src/widgets/search_results.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use crate::config;
#[derive(Debug, Default)]
pub struct SearchResults {
pub crates: Vec<crates_io_api::Crate>,
pub versions: Vec<crates_io_api::Version>,
pub table_state: TableState,
pub scrollbar_state: ScrollbarState,
}
Expand Down
Loading