summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2018-06-11 21:04:28 +0200
committerEmīls Piņķis <emils@mullvad.net>2018-07-05 16:05:05 +0100
commit461786cd03d0e2b94f72f5e84d80437c2e1afe03 (patch)
tree4e0eb9997829b826829c91b3ddf2b0cbde8cd412
parent07d42498ac21369f6a515f2d25963056b06ff85a (diff)
downloadmullvadvpn-461786cd03d0e2b94f72f5e84d80437c2e1afe03.tar.xz
mullvadvpn-461786cd03d0e2b94f72f5e84d80437c2e1afe03.zip
Remove special connect() constructor for problem report
-rw-r--r--mullvad-problem-report/src/main.rs6
-rw-r--r--mullvad-rpc/src/lib.rs6
2 files changed, 5 insertions, 7 deletions
diff --git a/mullvad-problem-report/src/main.rs b/mullvad-problem-report/src/main.rs
index b15f14415d..1f63d1aa19 100644
--- a/mullvad-problem-report/src/main.rs
+++ b/mullvad-problem-report/src/main.rs
@@ -218,9 +218,13 @@ fn send_problem_report(user_email: &str, user_message: &str, report_path: &Path)
.chain_err(|| ErrorKind::ReadLogError(report_path.to_path_buf()))?,
);
let metadata = collect_metadata();
+
let mut rpc_manager = mullvad_rpc::MullvadRpcFactory::new();
- let mut rpc_client = mullvad_rpc::ProblemReportProxy::connect(&mut rpc_manager)
+ let rpc_http_handle = rpc_manager
+ .new_connection()
.chain_err(|| ErrorKind::RpcError)?;
+ let mut rpc_client = mullvad_rpc::ProblemReportProxy::new(rpc_http_handle);
+
rpc_client
.problem_report(user_email, user_message, &report_content, &metadata)
.call()
diff --git a/mullvad-rpc/src/lib.rs b/mullvad-rpc/src/lib.rs
index 2fad63bfe4..02537adee3 100644
--- a/mullvad-rpc/src/lib.rs
+++ b/mullvad-rpc/src/lib.rs
@@ -137,12 +137,6 @@ jsonrpc_client!(pub struct ProblemReportProxy {
-> RpcRequest<()>;
});
-impl ProblemReportProxy<HttpHandle> {
- pub fn connect(manager: &mut MullvadRpcFactory) -> Result<Self, HttpError> {
- Ok(ProblemReportProxy::new(manager.new_connection()?))
- }
-}
-
jsonrpc_client!(pub struct RelayListProxy {
pub fn relay_list(&mut self) -> RpcRequest<RelayList>;
});