Remove unnecessary lifetime annotations. (#103)

This commit is contained in:
Jacob Hoffman-Andrews
2020-07-01 00:40:47 -07:00
committed by GitHub
parent bbde617719
commit e4ad3a5e5f
3 changed files with 10 additions and 10 deletions

View File

@@ -122,7 +122,7 @@ impl Response {
}
/// The header corresponding header value for the give name, if any.
pub fn header<'a>(&self, name: &'a str) -> Option<&str> {
pub fn header(&self, name: &str) -> Option<&str> {
self.headers
.iter()
.find(|h| h.is_name(name))
@@ -139,12 +139,12 @@ impl Response {
}
/// Tells if the response has the named header.
pub fn has<'a>(&self, name: &'a str) -> bool {
pub fn has(&self, name: &str) -> bool {
self.header(name).is_some()
}
/// All headers corresponding values for the give name, or empty vector.
pub fn all<'a>(&self, name: &'a str) -> Vec<&str> {
pub fn all(&self, name: &str) -> Vec<&str> {
self.headers
.iter()
.filter(|h| h.is_name(name))