diff options
| author | Eskil Queseth <eskilq@kth.se> | 2021-03-26 01:15:55 +0100 |
|---|---|---|
| committer | Eskil Queseth <eskilq@kth.se> | 2021-03-26 01:15:55 +0100 |
| commit | 5cc61e8d2140280421b5962b2911ebbcc927e9d1 (patch) | |
| tree | 4826ead4ec8cc5e920f263225c78558f449f650c /mumd/src/main.rs | |
| parent | 169eb4f49f3fd587e9c28f2209b2dd130425d866 (diff) | |
| download | mum-5cc61e8d2140280421b5962b2911ebbcc927e9d1.tar.gz | |
re-add error checking
Diffstat (limited to 'mumd/src/main.rs')
| -rw-r--r-- | mumd/src/main.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mumd/src/main.rs b/mumd/src/main.rs index 5b22089..18b84b8 100644 --- a/mumd/src/main.rs +++ b/mumd/src/main.rs @@ -77,7 +77,8 @@ async fn receive_commands( reader.filter_map(|buf| async { buf.ok() }) - .map(|buf| bincode::deserialize::<Command>(&buf).unwrap()) + .map(|buf| bincode::deserialize::<Command>(&buf)) + .filter_map(|e| async { e.ok() }) .filter_map(|command| async { let (tx, rx) = oneshot::channel(); |
