summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2022-01-05 07:01:08 -0500
committerJesse Luehrs <doy@tozt.net>2022-01-05 07:01:08 -0500
commit404ae6202e24c7bfc5625edb3ac064df4ecd105f (patch)
tree1177bdc4c2b4f8d857bf3d5630ee82fd2e4ccdd3 /src/main.rs
parente893d7cb8ca855e2843f60ec0b1045510e1577cf (diff)
downloadnbsh-404ae6202e24c7bfc5625edb3ac064df4ecd105f.tar.gz
nbsh-404ae6202e24c7bfc5625edb3ac064df4ecd105f.zip
shorten some names
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 69fe1f0..d858f58 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -13,7 +13,9 @@
#![allow(clippy::type_complexity)]
mod env;
+pub use env::Env;
mod event;
+pub use event::Event;
mod format;
mod info;
mod parse;
@@ -74,7 +76,7 @@ async fn async_main() -> anyhow::Result<i32> {
.chain(signals);
while signals.next().await.is_some() {
event_w
- .send(crate::event::Event::Resize(
+ .send(Event::Resize(
terminal_size::terminal_size().map_or(
(24, 80),
|(
@@ -93,7 +95,7 @@ async fn async_main() -> anyhow::Result<i32> {
let event_w = event_w.clone();
async_std::task::spawn(async move {
while let Some(key) = input.read_key().await.unwrap() {
- event_w.send(event::Event::Key(key)).await.unwrap();
+ event_w.send(Event::Key(key)).await.unwrap();
}
});
}
@@ -112,9 +114,9 @@ async fn async_main() -> anyhow::Result<i32> {
let mut interval = async_std::stream::interval(
std::time::Duration::from_secs(1),
);
- event_w.send(crate::event::Event::ClockTimer).await.unwrap();
+ event_w.send(Event::ClockTimer).await.unwrap();
while interval.next().await.is_some() {
- event_w.send(crate::event::Event::ClockTimer).await.unwrap();
+ event_w.send(Event::ClockTimer).await.unwrap();
}
});
}