Don’t take response output by reference
This commit is contained in:
parent
4b14837009
commit
2323222f2d
1 changed files with 3 additions and 6 deletions
|
@ -16,12 +16,9 @@ impl Response {
|
||||||
pub fn speed(&self) -> String {
|
pub fn speed(&self) -> String {
|
||||||
format!("{:?}", self.time)
|
format!("{:?}", self.time)
|
||||||
}
|
}
|
||||||
/// Retrieve the response as a result by reference
|
/// Retrieve the response as a normal result
|
||||||
pub fn output(&self) -> Result<&Value, &Error> {
|
pub fn output(self) -> Result<Value, Error> {
|
||||||
match &self.result {
|
self.result
|
||||||
Ok(v) => Ok(v),
|
|
||||||
Err(e) => Err(e),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue