diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-05-09 16:05:23 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-05-09 16:07:17 +0200 |
| commit | 7fe075e231f952f036c708f39425313ffb517a12 (patch) | |
| tree | 1283c25d0a6f7cd9dc5d2b8b9939e4572a76bf5e | |
| parent | b866ee448d7f316214075f6412995054e7dfd4ee (diff) | |
| download | mullvadvpn-7fe075e231f952f036c708f39425313ffb517a12.tar.xz mullvadvpn-7fe075e231f952f036c708f39425313ffb517a12.zip | |
Update mullvad_daemon to use serde 1.0 and new ipc
| -rw-r--r-- | mullvad_daemon/Cargo.toml | 6 | ||||
| -rw-r--r-- | mullvad_daemon/src/frontend_ipc_router.rs | 2 | ||||
| -rw-r--r-- | mullvad_daemon/src/main.rs | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/mullvad_daemon/Cargo.toml b/mullvad_daemon/Cargo.toml index 3fca0a15f7..42a00a29f6 100644 --- a/mullvad_daemon/Cargo.toml +++ b/mullvad_daemon/Cargo.toml @@ -6,9 +6,9 @@ description = "The meat of Mullvad, the core if you wish" [dependencies] error-chain = "0.10" -serde = "0.9" -serde_derive = "0.9" -serde_json = "0.9" +serde = "1.0" +serde_derive = "1.0" +serde_json = "1.0" log = "0.3" env_logger = "0.4" jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc" } diff --git a/mullvad_daemon/src/frontend_ipc_router.rs b/mullvad_daemon/src/frontend_ipc_router.rs index aad05cf778..1c1b74950c 100644 --- a/mullvad_daemon/src/frontend_ipc_router.rs +++ b/mullvad_daemon/src/frontend_ipc_router.rs @@ -20,7 +20,7 @@ pub fn build_router() -> jsonrpc_core::IoHandler { } fn add_route<T, U, F>(router: &mut jsonrpc_core::IoHandler, method: &str, handler: F) - where T: serde::Deserialize + 'static, + where for<'de> T: serde::Deserialize<'de>, U: serde::Serialize + 'static, F: Fn(&T) -> Result<U> + Send + Sync + 'static { diff --git a/mullvad_daemon/src/main.rs b/mullvad_daemon/src/main.rs index e4e732d749..ff4b62dcb3 100644 --- a/mullvad_daemon/src/main.rs +++ b/mullvad_daemon/src/main.rs @@ -24,8 +24,8 @@ fn init_logger() -> Result<()> { env_logger::init().chain_err(|| "Failed to bootstrap logging system") } -fn start_ipc() -> Result<talpid_ipc::http_ipc::ServerHandle> { - talpid_ipc::http_ipc::start(frontend_ipc_router::build_router) +fn start_ipc() -> Result<talpid_ipc::IpcServer> { + talpid_ipc::IpcServer::start(frontend_ipc_router::build_router().into(), 0) .chain_err(|| "Failed to start IPC server") } |
