cli_helpers: use anyhow in app fn; aquatic_ws: reorganize error handling

This commit is contained in:
Joakim Frostegård 2020-05-23 14:05:50 +02:00
parent 1efe6f96c5
commit 526faa9aab
13 changed files with 134 additions and 93 deletions

View file

@ -13,6 +13,7 @@ path = "src/lib/lib.rs"
name = "aquatic_udp"
[dependencies]
anyhow = "1"
aquatic_common = { path = "../aquatic_common" }
bittorrent_udp = { path = "../bittorrent_udp" }
cli_helpers = { path = "../cli_helpers" }

View file

@ -15,7 +15,7 @@ use config::Config;
use common::State;
pub fn run(config: Config){
pub fn run(config: Config) -> ::anyhow::Result<()> {
let state = State::new();
let (request_sender, request_receiver) = unbounded();