Skip to content

Commit

Permalink
style: apply latest clippy suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
  • Loading branch information
jdrouet authored and udoprog committed Oct 21, 2024
1 parent e54c276 commit c969e13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ impl<'a> Tokenizer<'a> {

let c = s.curr_byte()?;
if c != b'[' && c != b'>' {
static EXPECTED: &[u8] = &[b'[', b'>'];
static EXPECTED: &[u8] = b"[>";
return Err(StreamError::InvalidCharMultiple(
c,
EXPECTED,
Expand Down Expand Up @@ -917,7 +917,7 @@ impl<'a> Tokenizer<'a> {
}
}
_ => {
static EXPECTED: &[u8] = &[b'"', b'\'', b'S', b'P'];
static EXPECTED: &[u8] = b"\"'SP";
let pos = s.gen_text_pos();
Err(StreamError::InvalidCharMultiple(c, EXPECTED, pos))
}
Expand Down
6 changes: 3 additions & 3 deletions src/strspan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl<'a> StrSpan<'a> {
}
}

impl<'a> fmt::Debug for StrSpan<'a> {
impl fmt::Debug for StrSpan<'_> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(
f,
Expand All @@ -102,13 +102,13 @@ impl<'a> fmt::Debug for StrSpan<'a> {
}
}

impl<'a> fmt::Display for StrSpan<'a> {
impl fmt::Display for StrSpan<'_> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.as_str())
}
}

impl<'a> Deref for StrSpan<'a> {
impl Deref for StrSpan<'_> {
type Target = str;

fn deref(&self) -> &Self::Target {
Expand Down

0 comments on commit c969e13

Please sign in to comment.