remove previous idiocy

This commit is contained in:
Schrottkatze 2024-11-06 16:38:08 +01:00
parent 605cb20115
commit cee861758d
Signed by: schrottkatze
SSH key fingerprint: SHA256:hXb3t1vINBFCiDCmhRABHX5ocdbLiKyCdKI4HK2Rbbc

View file

@ -1,49 +1,44 @@
// use std::io; use std::io;
// use app::App; use app::App;
// use crossterm::event::{self, KeyCode, KeyEventKind}; use crossterm::event::{self, KeyCode, KeyEventKind};
// use ratatui::{style::Stylize, widgets::Paragraph, DefaultTerminal}; use ratatui::{style::Stylize, widgets::Paragraph, DefaultTerminal};
fn main() -> io::Result<()> { fn main() -> io::Result<()> {
// let mut term = ratatui::init(); let mut term = ratatui::init();
// term.clear()?; term.clear()?;
// let r = App::default().run(&mut term); let r = App::default().run(&mut term);
// ratatui::restore(); ratatui::restore();
// r r
let mut teststr = String::from("Hello! ää");
} }
fn rev_in_place(s: &mut String) { mod app {
s.ch
use std::io;
use ratatui::{DefaultTerminal, Frame};
#[derive(Default)]
pub struct App {
exit: bool,
} }
// mod app { impl App {
pub fn run(&mut self, terminal: &mut DefaultTerminal) -> io::Result<()> {
while !self.exit {
terminal.draw(|frame| self.draw(frame))?;
self.handle_events()?;
}
Ok(())
}
// use std::io; fn draw(&self, frame: &mut Frame) {
todo!()
}
// use ratatui::{DefaultTerminal, Frame}; fn handle_events(&mut self) -> io::Result<()> {
todo!()
// #[derive(Default)] }
// pub struct App { }
// exit: bool, }
// }
// impl App {
// pub fn run(&mut self, terminal: &mut DefaultTerminal) -> io::Result<()> {
// while !self.exit {
// terminal.draw(|frame| self.draw(frame))?;
// self.handle_events()?;
// }
// Ok(())
// }
// fn draw(&self, frame: &mut Frame) {
// todo!()
// }
// fn handle_events(&mut self) -> io::Result<()> {
// todo!()
// }
// }
// }