From 156893d774b4da5b541fdbb08428f9ec392949a0 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Sun, 25 Apr 2021 18:21:52 +0100 Subject: Update docs, unify on SQLx, bugfixes (#40) * Begin moving to sqlx for local too * Stupid scanners should just have a nice cup of tea Random internet shit searching for /.env or whatever * Remove diesel and rusqlite fully --- src/command/event.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/command/event.rs') diff --git a/src/command/event.rs b/src/command/event.rs index b205be70..f09752d6 100644 --- a/src/command/event.rs +++ b/src/command/event.rs @@ -1,7 +1,7 @@ -use std::sync::mpsc; use std::thread; use std::time::Duration; +use crossbeam_channel::unbounded; use termion::event::Key; use termion::input::TermRead; @@ -13,7 +13,7 @@ pub enum Event { /// A small event handler that wrap termion input and tick events. Each event /// type is handled in its own thread and returned to a common `Receiver` pub struct Events { - rx: mpsc::Receiver>, + rx: crossbeam_channel::Receiver>, } #[derive(Debug, Clone, Copy)] @@ -37,7 +37,7 @@ impl Events { } pub fn with_config(config: Config) -> Events { - let (tx, rx) = mpsc::channel(); + let (tx, rx) = unbounded(); { let tx = tx.clone(); @@ -62,7 +62,7 @@ impl Events { Events { rx } } - pub fn next(&self) -> Result, mpsc::RecvError> { + pub fn next(&self) -> Result, crossbeam_channel::RecvError> { self.rx.recv() } } -- cgit v1.3.1