Skip to content

Commit

Permalink
wip: rename search to SearchPage
Browse files Browse the repository at this point in the history
  • Loading branch information
joshka committed Feb 10, 2024
1 parent d9ce912 commit 462ccd3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ use crate::{
},
};

mod search;
use search::Search;
mod search_page;
use search_page::SearchPage;

#[derive(
Default, Debug, Display, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize, EnumIs,
Expand Down Expand Up @@ -137,7 +137,7 @@ pub struct App {
/// known initially and can be used for UI elements like pagination.
total_num_crates: Option<u64>,

search: Search,
search: SearchPage,

/// A popupt to show info / error messages
popup: Option<(PopupMessageWidget, PopupMessageState)>,
Expand Down Expand Up @@ -169,7 +169,7 @@ pub struct App {
impl App {
pub fn new() -> Self {
let (tx, rx) = mpsc::unbounded_channel();
let search = Search::new();
let search = SearchPage::new();
Self {
rx,
tx,
Expand Down
4 changes: 2 additions & 2 deletions src/app/search.rs → src/app/search_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use tui_input::{backend::crossterm::EventHandler, Input};
use crate::{action::Action, widgets::search_results_table::SearchResultsTable};

#[derive(Debug)]
pub struct Search {
pub struct SearchPage {
/// A string for the current search input by the user, submitted to
/// crates.io as a query
pub search: String,
Expand All @@ -25,7 +25,7 @@ pub struct Search {
pub input: tui_input::Input,
}

impl Search {
impl SearchPage {
pub fn new() -> Self {
Self {
search: String::new(),
Expand Down

0 comments on commit 462ccd3

Please sign in to comment.