Fix new warnings

This commit is contained in:
dylni
2022-05-13 08:00:25 -04:00
parent d2b21bda3b
commit ad2e0827f5
-6
View File
@@ -42,10 +42,8 @@ pub trait Pattern: private::Sealed {
}
impl Pattern for char {
#[doc(hidden)]
type __Encoded = EncodedChar;
#[doc(hidden)]
fn __encode(self) -> Self::__Encoded {
let mut encoded = EncodedChar {
buffer: [0; 4],
@@ -57,20 +55,16 @@ impl Pattern for char {
}
impl Pattern for &str {
#[doc(hidden)]
type __Encoded = Self;
#[doc(hidden)]
fn __encode(self) -> Self::__Encoded {
self
}
}
impl<'a> Pattern for &'a String {
#[doc(hidden)]
type __Encoded = <&'a str as Pattern>::__Encoded;
#[doc(hidden)]
fn __encode(self) -> Self::__Encoded {
(**self).__encode()
}