From 7147d32601454a545a553ea25bbf5ef12f079ccf Mon Sep 17 00:00:00 2001 From: "Franz Heinzmann (Frando)" Date: Fri, 15 Jul 2022 16:24:04 +0200 Subject: [PATCH] fix --- deltachat-ffi/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deltachat-ffi/src/lib.rs b/deltachat-ffi/src/lib.rs index b68412e98..ce66794e2 100644 --- a/deltachat-ffi/src/lib.rs +++ b/deltachat-ffi/src/lib.rs @@ -4461,14 +4461,14 @@ mod jsonrpc { } let api_version = to_string_lossy(api_version); - let rpc_api = match &api_version { + let rpc_api = match api_version.as_str() { "v0" => { deltachat_jsonrpc::api::DeltaChatApiV0::from_arc((*account_manager).inner.clone()) } - _ => { - error!( - ctx, - "The requested JSON-RPC API version is not supported.", err + version => { + eprintln!( + "Error initializing JSON-RPC API: API version {} is not supported.", + version ); return ptr::null_mut(); }