diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2020-05-09 16:04:06 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2020-05-09 16:04:06 +0200 |
commit | 76c84042120b97ee98af6a1c40ab86aca062408a (patch) | |
tree | e7e298a13c0b91a28aa1d939aae0408cae0a24dd /src/diplonat.rs | |
parent | a19ae25a7d20d338243e2fef5a1fd45437701c2a (diff) | |
download | diplonat-76c84042120b97ee98af6a1c40ab86aca062408a.tar.gz diplonat-76c84042120b97ee98af6a1c40ab86aca062408a.zip |
Rewrite with anyhow
Diffstat (limited to 'src/diplonat.rs')
-rw-r--r-- | src/diplonat.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/diplonat.rs b/src/diplonat.rs index 44f6ac5..089a5c7 100644 --- a/src/diplonat.rs +++ b/src/diplonat.rs @@ -1,4 +1,5 @@ use igd::Gateway; +use anyhow::Result; use crate::*; @@ -7,7 +8,7 @@ pub struct DiplonatContext { //pub gateway: igd::Gateway } -pub fn setup() -> Result<DiplonatContext, String> { +pub fn setup() -> Result<DiplonatContext> { return Ok(DiplonatContext { config: config::load_env()?, //gateway: search_gateway(Default::default()).await |