summaryrefslogtreecommitdiff
path: root/src/importer.rs
diff options
context:
space:
mode:
authorKjetil Orbekk <kjetil.orbekk@gmail.com>2020-02-01 09:13:12 -0500
committerKjetil Orbekk <kjetil.orbekk@gmail.com>2020-02-01 09:13:12 -0500
commitaa12104e4c5572a5806bf1e6b8dd27d72705ab84 (patch)
tree6f2f9344d1f139800350784c28d8a5eb6b62b4d8 /src/importer.rs
parentfb9f143f2353dc8c64a18be84c12b53cdad847e7 (diff)
Improve logging legibility
Diffstat (limited to 'src/importer.rs')
-rw-r--r--src/importer.rs9
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);