summaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/app.rs b/src/app.rs
index b86e6ab..f60c2ca 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -10,16 +10,15 @@ use crate::{
use ratatui::{
crossterm::event::{self, Event, KeyCode, KeyEvent, KeyEventKind, KeyModifiers},
prelude::*,
- widgets::Block,
};
-pub struct App<'a> {
+pub struct App {
exit: bool,
- view: SheetView<'a>,
- logview: Option<LogView<'a>>,
+ view: SheetView,
+ logview: Option<LogView>,
}
-impl App<'_> {
+impl App {
pub fn new() -> Self {
let sheet_id = Register::create(200, 1000);
let sheet = Register::get(sheet_id).unwrap();
@@ -81,7 +80,7 @@ impl App<'_> {
match self.logview {
Some(_) => self.logview = None,
None => {
- self.logview = Some(LogView::new().block(Block::bordered().title(" Log ")))
+ self.logview = Some(LogView::new())
}
}
}
@@ -94,7 +93,7 @@ impl App<'_> {
}
}
-impl Widget for &mut App<'_> {
+impl Widget for &mut App {
fn render(self, area: Rect, buf: &mut Buffer)
where
Self: Sized,