From 4449c91c043cad20b71389768d586b466fa8dbb9 Mon Sep 17 00:00:00 2001 From: hashmap Date: Tue, 21 Jan 2020 17:30:29 +0100 Subject: [PATCH] Fix return code in peers API (#3186) Rust compiler found this issue, we were preparing a response and the dropping it and returning a default one --- api/src/handlers/peers_api.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/api/src/handlers/peers_api.rs b/api/src/handlers/peers_api.rs index d6b324152..9469ef273 100644 --- a/api/src/handlers/peers_api.rs +++ b/api/src/handlers/peers_api.rs @@ -157,9 +157,7 @@ impl Handler for PeerHandler { format!("unban failed: {:?}", e), ), }, - _ => return response(StatusCode::BAD_REQUEST, "invalid command"), - }; - - response(StatusCode::OK, "{}") + _ => response(StatusCode::BAD_REQUEST, "invalid command"), + } } }