diff options
| author | Erik Larkö <erik@mullvad.net> | 2017-03-22 22:10:28 +0800 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2017-03-22 22:10:59 +0800 |
| commit | 258de4f4594740566641c2c3fa94f6c73c5980a2 (patch) | |
| tree | 4cf71137460568d3581c155029d1d8e629f3090e | |
| parent | 9fcc8f4c3f32ccb12f58c3405669b7a921ed2e7e (diff) | |
| download | mullvadvpn-258de4f4594740566641c2c3fa94f6c73c5980a2.tar.xz mullvadvpn-258de4f4594740566641c2c3fa94f6c73c5980a2.zip | |
Don't chain the boxed error
| -rw-r--r-- | talpid_ipc/src/http_ipc.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/talpid_ipc/src/http_ipc.rs b/talpid_ipc/src/http_ipc.rs index 46a22eab3d..1cd675a990 100644 --- a/talpid_ipc/src/http_ipc.rs +++ b/talpid_ipc/src/http_ipc.rs @@ -25,12 +25,7 @@ pub fn start_new_server<T, U, F>(on_message: F) -> Result<IpcServerId> } fn start_http_server(addr: &str) -> Result<tiny_http::Server> { - tiny_http::Server::http(addr).map_err(|e| chain_boxed_err(e, ErrorKind::CouldNotStartServer)) -} - -fn chain_boxed_err(boxed_cause: Box<::std::error::Error>, new_error: ErrorKind) -> super::Error { - let cause = super::Error::from_kind(ErrorKind::Msg(boxed_cause.to_string())); - super::Error::with_chain(cause, new_error) + tiny_http::Server::http(addr).map_err(|e| ErrorKind::Msg(e.to_string()).into()) } fn start_receive_loop<T, U, F>(server: tiny_http::Server, mut on_message: F) |
