Use lifetime contravariance to elide more lifetimes in core+alloc+std

This commit is contained in:
Scott McMurray
2019-03-09 19:10:28 -08:00
parent 26b4cb4848
commit df4ea90b39
19 changed files with 93 additions and 93 deletions

View File

@@ -297,10 +297,10 @@ impl Iterator for LookupHost {
}
}
impl<'a> TryFrom<&'a str> for LookupHost {
impl TryFrom<&str> for LookupHost {
type Error = io::Error;
fn try_from(_v: &'a str) -> io::Result<LookupHost> {
fn try_from(_v: &str) -> io::Result<LookupHost> {
unsupported()
}
}

View File

@@ -35,7 +35,7 @@ impl Iterator for LookupHost {
}
}
impl<'a> TryFrom<&'a str> for LookupHost {
impl TryFrom<&str> for LookupHost {
type Error = io::Error;
fn try_from(s: &str) -> io::Result<LookupHost> {

View File

@@ -420,10 +420,10 @@ impl Iterator for LookupHost {
}
}
impl<'a> TryFrom<&'a str> for LookupHost {
impl TryFrom<&str> for LookupHost {
type Error = io::Error;
fn try_from(v: &'a str) -> io::Result<LookupHost> {
fn try_from(v: &str) -> io::Result<LookupHost> {
LookupHost::new(v.to_owned())
}
}

View File

@@ -447,10 +447,10 @@ pub mod net {
unsafe impl Send for LookupHost {}
impl<'a> TryFrom<&'a str> for LookupHost {
impl TryFrom<&str> for LookupHost {
type Error = io::Error;
fn try_from(_v: &'a str) -> io::Result<LookupHost> {
fn try_from(_v: &str) -> io::Result<LookupHost> {
unimpl!();
}
}

View File

@@ -298,10 +298,10 @@ impl Iterator for LookupHost {
}
}
impl<'a> TryFrom<&'a str> for LookupHost {
impl TryFrom<&str> for LookupHost {
type Error = io::Error;
fn try_from(_v: &'a str) -> io::Result<LookupHost> {
fn try_from(_v: &str) -> io::Result<LookupHost> {
unsupported()
}
}