From 2323222f2df3d53432dfd2e38fa91c8950aa09bc Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Wed, 23 Nov 2022 09:11:58 +0000 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20take=20response=20output=20by?= =?UTF-8?q?=20reference?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/dbs/response.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/src/dbs/response.rs b/lib/src/dbs/response.rs index 9f37cce4..98a8c93c 100644 --- a/lib/src/dbs/response.rs +++ b/lib/src/dbs/response.rs @@ -16,12 +16,9 @@ impl Response { pub fn speed(&self) -> String { format!("{:?}", self.time) } - /// Retrieve the response as a result by reference - pub fn output(&self) -> Result<&Value, &Error> { - match &self.result { - Ok(v) => Ok(v), - Err(e) => Err(e), - } + /// Retrieve the response as a normal result + pub fn output(self) -> Result { + self.result } }