Make Cargo and Clippy happy

This commit is contained in:
Clément Renault 2025-04-01 10:45:42 +02:00
parent 249da5846c
commit 4d90e3d2ec
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
72 changed files with 145 additions and 165 deletions

View file

@ -15,7 +15,7 @@ impl<'a, D: ObjectView, F: ArrayView> Context<'a, D, F> {
}
}
impl<'a, D: ObjectView, F: ArrayView> ObjectView for Context<'a, D, F> {
impl<D: ObjectView, F: ArrayView> ObjectView for Context<'_, D, F> {
fn as_value(&self) -> &dyn ValueView {
self
}
@ -52,7 +52,7 @@ impl<'a, D: ObjectView, F: ArrayView> ObjectView for Context<'a, D, F> {
}
}
impl<'a, D: ObjectView, F: ArrayView> ValueView for Context<'a, D, F> {
impl<D: ObjectView, F: ArrayView> ValueView for Context<'_, D, F> {
fn as_debug(&self) -> &dyn std::fmt::Debug {
self
}

View file

@ -67,7 +67,7 @@ impl<'a> Document<'a> {
}
}
impl<'a> ObjectView for Document<'a> {
impl ObjectView for Document<'_> {
fn as_value(&self) -> &dyn ValueView {
self
}
@ -98,7 +98,7 @@ impl<'a> ObjectView for Document<'a> {
}
}
impl<'a> ValueView for Document<'a> {
impl ValueView for Document<'_> {
fn as_debug(&self) -> &dyn Debug {
self
}
@ -283,7 +283,7 @@ impl<'doc> ParseableArray<'doc> {
}
}
impl<'doc> ArrayView for ParseableArray<'doc> {
impl ArrayView for ParseableArray<'_> {
fn as_value(&self) -> &dyn ValueView {
self
}
@ -311,7 +311,7 @@ impl<'doc> ArrayView for ParseableArray<'doc> {
}
}
impl<'doc> ValueView for ParseableArray<'doc> {
impl ValueView for ParseableArray<'_> {
fn as_debug(&self) -> &dyn std::fmt::Debug {
self
}
@ -353,7 +353,7 @@ impl<'doc> ValueView for ParseableArray<'doc> {
}
}
impl<'doc> ObjectView for ParseableMap<'doc> {
impl ObjectView for ParseableMap<'_> {
fn as_value(&self) -> &dyn ValueView {
self
}
@ -392,7 +392,7 @@ impl<'doc> ObjectView for ParseableMap<'doc> {
}
}
impl<'doc> ValueView for ParseableMap<'doc> {
impl ValueView for ParseableMap<'_> {
fn as_debug(&self) -> &dyn std::fmt::Debug {
self
}
@ -441,7 +441,7 @@ impl<'doc> ValueView for ParseableMap<'doc> {
}
}
impl<'doc> ValueView for ParseableValue<'doc> {
impl ValueView for ParseableValue<'_> {
fn as_debug(&self) -> &dyn Debug {
self
}
@ -622,7 +622,7 @@ struct ArraySource<'s, 'doc> {
s: &'s RawVec<'doc>,
}
impl<'s, 'doc> fmt::Display for ArraySource<'s, 'doc> {
impl fmt::Display for ArraySource<'_, '_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "[")?;
for item in self.s {
@ -638,7 +638,7 @@ struct ArrayRender<'s, 'doc> {
s: &'s RawVec<'doc>,
}
impl<'s, 'doc> fmt::Display for ArrayRender<'s, 'doc> {
impl fmt::Display for ArrayRender<'_, '_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
for item in self.s {
let v = ParseableValue::new(item, self.s.bump());

View file

@ -17,7 +17,7 @@ pub struct FieldValue<'a, D: ObjectView> {
metadata: Metadata,
}
impl<'a, D: ObjectView> ValueView for FieldValue<'a, D> {
impl<D: ObjectView> ValueView for FieldValue<'_, D> {
fn as_debug(&self) -> &dyn std::fmt::Debug {
self
}
@ -78,7 +78,7 @@ impl<'a, D: ObjectView> FieldValue<'a, D> {
}
}
impl<'a, D: ObjectView> ObjectView for FieldValue<'a, D> {
impl<D: ObjectView> ObjectView for FieldValue<'_, D> {
fn as_value(&self) -> &dyn ValueView {
self
}
@ -148,7 +148,7 @@ impl<'a, 'map, D: ObjectView> BorrowedFields<'a, 'map, D> {
}
}
impl<'a, D: ObjectView> ArrayView for OwnedFields<'a, D> {
impl<D: ObjectView> ArrayView for OwnedFields<'_, D> {
fn as_value(&self) -> &dyn ValueView {
self.0.as_value()
}
@ -170,7 +170,7 @@ impl<'a, D: ObjectView> ArrayView for OwnedFields<'a, D> {
}
}
impl<'a, 'map, D: ObjectView> ArrayView for BorrowedFields<'a, 'map, D> {
impl<D: ObjectView> ArrayView for BorrowedFields<'_, '_, D> {
fn as_value(&self) -> &dyn ValueView {
self
}
@ -212,7 +212,7 @@ impl<'a, 'map, D: ObjectView> ArrayView for BorrowedFields<'a, 'map, D> {
}
}
impl<'a, 'map, D: ObjectView> ValueView for BorrowedFields<'a, 'map, D> {
impl<D: ObjectView> ValueView for BorrowedFields<'_, '_, D> {
fn as_debug(&self) -> &dyn std::fmt::Debug {
self
}
@ -254,7 +254,7 @@ impl<'a, 'map, D: ObjectView> ValueView for BorrowedFields<'a, 'map, D> {
}
}
impl<'a, D: ObjectView> ValueView for OwnedFields<'a, D> {
impl<D: ObjectView> ValueView for OwnedFields<'_, D> {
fn as_debug(&self) -> &dyn std::fmt::Debug {
self
}
@ -292,7 +292,7 @@ struct ArraySource<'a, 'map, D: ObjectView> {
s: &'a BorrowedFields<'a, 'map, D>,
}
impl<'a, 'map, D: ObjectView> fmt::Display for ArraySource<'a, 'map, D> {
impl<D: ObjectView> fmt::Display for ArraySource<'_, '_, D> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "[")?;
for item in self.s.values() {
@ -307,7 +307,7 @@ struct ArrayRender<'a, 'map, D: ObjectView> {
s: &'a BorrowedFields<'a, 'map, D>,
}
impl<'a, 'map, D: ObjectView> fmt::Display for ArrayRender<'a, 'map, D> {
impl<D: ObjectView> fmt::Display for ArrayRender<'_, '_, D> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
for item in self.s.values() {
write!(f, "{}", item.render())?;