Remove Response::status_line. (#263)

The necessary functionality is available via status_text, and removing
this method means we have more flexibility in our internal storage.
This commit is contained in:
Jacob Hoffman-Andrews
2020-12-05 12:01:56 -08:00
committed by GitHub
parent c3a6f50dbe
commit 57f251d766

View File

@@ -94,11 +94,6 @@ impl Response {
self.url.as_ref().map(|s| &s[..]).unwrap_or("")
}
/// The entire status line like: `HTTP/1.1 200 OK`
pub fn status_line(&self) -> &str {
self.status_line.as_str()
}
/// The http version: `HTTP/1.1`
pub fn http_version(&self) -> &str {
&self.status_line.as_str()[0..self.index.http_version]