panorama/src/main.rs

24 lines
411 B
Rust
Raw Normal View History

2021-02-12 08:12:43 +00:00
#[macro_use]
extern crate crossterm;
mod ui;
use anyhow::Result;
2021-02-12 08:54:19 +00:00
use lettre::SmtpClient;
use tokio::sync::oneshot;
2021-02-12 08:12:43 +00:00
2021-02-12 08:54:19 +00:00
type ExitSender = oneshot::Sender<()>;
2021-02-12 08:12:43 +00:00
2021-02-12 08:54:19 +00:00
#[tokio::main]
async fn main() -> Result<()> {
SmtpClient::new_simple("");
2021-02-12 08:12:43 +00:00
2021-02-12 08:54:19 +00:00
let (exit_tx, exit_rx) = oneshot::channel::<()>();
2021-02-12 08:12:43 +00:00
2021-02-12 08:54:19 +00:00
let stdout = std::io::stdout();
tokio::spawn(ui::run_ui(stdout, exit_tx));
2021-02-12 08:12:43 +00:00
2021-02-12 08:54:19 +00:00
exit_rx.await?;
2021-02-12 08:12:43 +00:00
Ok(())
}