Skip to content

Commit

Permalink
Remove redundant lifetimes from impl
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcono1234 committed Oct 28, 2023
1 parent d436a6f commit 495c35b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/reader/stream_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1779,7 +1779,7 @@ struct NumberBytesValueReader<'j, R: Read> {
restrict_number: bool,
requires_borrowed_result: bool,
}
impl<'j, R: Read> NumberBytesProvider<ReaderError> for NumberBytesValueReader<'j, R> {
impl<R: Read> NumberBytesProvider<ReaderError> for NumberBytesValueReader<'_, R> {
fn consume_current_peek_next(&mut self) -> Result<Option<u8>, ReaderError> {
// Note: The first byte was not actually read by `BytesValueReader`, instead it was peeked by creator
// of NumberBytesValueReader. However, consume it here to include it in the final value.
Expand Down Expand Up @@ -1814,7 +1814,7 @@ struct SkippingNumberBytesReader<'j, R: Read> {
json_reader: &'j mut JsonStreamReader<R>,
consumed_bytes: u32,
}
impl<'j, R: Read> NumberBytesProvider<ReaderIoError> for SkippingNumberBytesReader<'j, R> {
impl<R: Read> NumberBytesProvider<ReaderIoError> for SkippingNumberBytesReader<'_, R> {
fn consume_current_peek_next(&mut self) -> Result<Option<u8>, ReaderIoError> {
// Should not fail since last peek_byte() succeeded
self.json_reader.skip_peeked_byte();
Expand Down Expand Up @@ -5197,7 +5197,7 @@ mod tests {
}
}

impl<'a> Read for DebuggableReader<'a> {
impl Read for DebuggableReader<'_> {
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
if self.has_read {
return Ok(0);
Expand All @@ -5213,7 +5213,7 @@ mod tests {
}
}

impl<'a> Debug for DebuggableReader<'a> {
impl Debug for DebuggableReader<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "debuggable-reader")
}
Expand Down
6 changes: 3 additions & 3 deletions src/serde/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ impl<R: JsonReader> JsonReaderDeserializer<'_, R> {
* TODO: In the documentation of the methods below use links when referring to other method,
* e.g. [`deserialize_map`]; however, rustdoc seems to be unable to create links?
*/
impl<'de, 's, 'a, R: JsonReader> Deserializer<'de> for &'s mut JsonReaderDeserializer<'a, R> {
impl<'de, R: JsonReader> Deserializer<'de> for &mut JsonReaderDeserializer<'_, R> {
type Error = DeserializerError;

/// Require the `Deserializer` to figure out how to drive the visitor based
Expand Down Expand Up @@ -937,7 +937,7 @@ struct VariantAccess<'s, 'a, R: JsonReader> {
consumed_variant_value: bool,
}

impl<'de, 's, 'a, R: JsonReader> serde::de::EnumAccess<'de> for &mut VariantAccess<'s, 'a, R> {
impl<'de, R: JsonReader> serde::de::EnumAccess<'de> for &mut VariantAccess<'_, '_, R> {
type Error = DeserializerError;
type Variant = Self;

Expand Down Expand Up @@ -1003,7 +1003,7 @@ struct UnitVariantAccess<'s, 'a, R: JsonReader> {
consumed_variant_value: bool,
}

impl<'de, 's, 'a, R: JsonReader> serde::de::EnumAccess<'de> for &mut UnitVariantAccess<'s, 'a, R> {
impl<'de, R: JsonReader> serde::de::EnumAccess<'de> for &mut UnitVariantAccess<'_, '_, R> {
type Error = DeserializerError;
type Variant = Self;

Expand Down

0 comments on commit 495c35b

Please sign in to comment.