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