Skip to content

Commit

Permalink
Fix new warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dylni committed May 13, 2022
1 parent e61fb11 commit d7a4e1c
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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()
}
Expand Down

0 comments on commit d7a4e1c

Please sign in to comment.