refactor: remove unused struct+impl ListItem
This commit is contained in:
parent
bb4b309ad9
commit
023e9237ba
14
src/app.rs
14
src/app.rs
|
@ -8,11 +8,6 @@ use crate::api::SearchResult;
|
||||||
/// Application result type.
|
/// Application result type.
|
||||||
pub type AppResult<T> = std::result::Result<T, Box<dyn error::Error>>;
|
pub type AppResult<T> = std::result::Result<T, Box<dyn error::Error>>;
|
||||||
|
|
||||||
struct ListItem {
|
|
||||||
title: String,
|
|
||||||
released: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ResultList {
|
pub struct ResultList {
|
||||||
pub state: ListState,
|
pub state: ListState,
|
||||||
pub items: Vec<SearchResult>,
|
pub items: Vec<SearchResult>,
|
||||||
|
@ -54,15 +49,6 @@ impl ResultList {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ListItem {
|
|
||||||
fn new(title: &str, released: &str) -> Self {
|
|
||||||
Self {
|
|
||||||
title: title.to_string(),
|
|
||||||
released: released.to_string(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Application state
|
/// Application state
|
||||||
pub struct App {
|
pub struct App {
|
||||||
/// Current value of the input box
|
/// Current value of the input box
|
||||||
|
|
Reference in a new issue