Clean directory structure

This commit is contained in:
Austen Adler 2021-05-14 21:26:55 -04:00
parent ed5a26d88f
commit fd6cdf4d7d
4 changed files with 10 additions and 20 deletions

View File

@ -7,16 +7,8 @@ readme = "README.adoc"
keywords = ["tui", "cli", "rpn"]
categories = ["command-line-utilities"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# Linux only
# tui = "0.14"
# termion = "1.5"
# Windows support
crossterm = "0.18"
tui = { version = "0.14", default-features = false, features = ['crossterm'] }
serde = {version = "1.0", features = ["derive"]}
confy = "0.4.0"

View File

@ -2,24 +2,23 @@
#![allow(dead_code)]
mod calc;
mod event;
mod format;
mod util;
use util::event::{Event, Events};
use calc::constants::{CalculatorDisplayMode, CalculatorState, RegisterState};
use calc::errors::CalculatorResult;
use calc::Calculator;
use calc::{
constants::{CalculatorDisplayMode, CalculatorState, RegisterState},
errors::CalculatorResult,
Calculator,
};
use crossterm::{
event::{DisableMouseCapture, KeyCode, KeyEvent, KeyModifiers},
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use io::stdout;
use std::cmp;
use std::convert::TryFrom;
use std::io::Write;
use event::{Event, Events};
// use io::stdout;
use std::{error::Error, io};
use std::{cmp, convert::TryFrom, error::Error, io, io::Write};
use tui::{
backend::CrosstermBackend,
layout::{Constraint, Direction, Layout},
@ -277,7 +276,7 @@ impl App {
fn main() -> Result<(), Box<dyn Error>> {
enable_raw_mode()?;
let mut stdout = stdout();
let mut stdout = io::stdout();
execute!(stdout, EnterAlternateScreen, DisableMouseCapture)?;
let backend = CrosstermBackend::new(stdout);
let mut terminal = Terminal::new(backend)?;

View File

@ -1 +0,0 @@
pub mod event;