diff options
Diffstat (limited to 'src/importer.rs')
-rw-r--r-- | src/importer.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/importer.rs b/src/importer.rs index 8513b54..2966449 100644 --- a/src/importer.rs +++ b/src/importer.rs @@ -14,13 +14,11 @@ pub enum Command { Quit, } -fn handle_command(pool: ThreadPool, - command: Command) { +fn handle_command(pool: ThreadPool, command: Command) { info!("handle {:?}", command); } -fn receive_commands(pool: ThreadPool, - rx: Arc<Mutex<Receiver<Command>>>) { +fn receive_commands(pool: ThreadPool, rx: Arc<Mutex<Receiver<Command>>>) { info!("receive_commands"); match (move || -> Result<(), Box<dyn std::error::Error>> { let rx = rx.lock().expect("channel"); @@ -30,7 +28,8 @@ fn receive_commands(pool: ThreadPool, let pool0 = pool.clone(); pool.execute(|| handle_command(pool0, command)); command = rx.recv()?; - }})() { + } + })() { Ok(()) => (), Err(e) => { error!("receive_commands: {:?}", e); |