diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2020-02-01 09:13:12 -0500 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2020-02-01 09:13:12 -0500 |
commit | aa12104e4c5572a5806bf1e6b8dd27d72705ab84 (patch) | |
tree | 6f2f9344d1f139800350784c28d8a5eb6b62b4d8 /src/importer.rs | |
parent | fb9f143f2353dc8c64a18be84c12b53cdad847e7 (diff) |
Improve logging legibility
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); |