fix: fixes a regression 1.11.0 feature

This commit is contained in:
Kevin K 2017-03-09 21:47:53 -05:00
parent 1e4cce0291
commit 075036c28d
No known key found for this signature in database
GPG key ID: 17218E4B3692F01A

View file

@ -11,8 +11,8 @@ use fmt::Format;
/// `Some("foo")`, whereas "blark" would yield `None`. /// `Some("foo")`, whereas "blark" would yield `None`.
#[cfg(feature = "suggestions")] #[cfg(feature = "suggestions")]
#[cfg_attr(feature = "lints", allow(needless_lifetimes))] #[cfg_attr(feature = "lints", allow(needless_lifetimes))]
pub fn did_you_mean<'a, T, I>(v: &str, possible_values: I) -> Option<&'a str> pub fn did_you_mean<'a, T: ?Sized, I>(v: &str, possible_values: I) -> Option<&'a str>
where T: AsRef<str> + 'a + ?Sized, where T: AsRef<str> + 'a,
I: IntoIterator<Item = &'a T> I: IntoIterator<Item = &'a T>
{ {
@ -31,8 +31,8 @@ pub fn did_you_mean<'a, T, I>(v: &str, possible_values: I) -> Option<&'a str>
} }
#[cfg(not(feature = "suggestions"))] #[cfg(not(feature = "suggestions"))]
pub fn did_you_mean<'a, T, I>(_: &str, _: I) -> Option<&'a str> pub fn did_you_mean<'a, T: ?Sized, I>(_: &str, _: I) -> Option<&'a str>
where T: AsRef<str> + 'a + ?Sized, where T: AsRef<str> + 'a,
I: IntoIterator<Item = &'a T> I: IntoIterator<Item = &'a T>
{ {
None None