Skip to content

Commit 30e9cd2

Browse files
committed
[FIX] clippy and lint issues
1 parent cc5e149 commit 30e9cd2

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

parquet-variant-compute/src/variant_array.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,12 @@ impl VariantArray {
170170

171171
/// Get the metadata bytes for a specific index
172172
pub fn metadata_bytes(&self, index: usize) -> &[u8] {
173-
self.metadata_field().as_binary_view().value(index).as_ref()
173+
self.metadata_field().as_binary_view().value(index)
174174
}
175175

176176
/// Get the value bytes for a specific index
177177
pub fn value_bytes(&self, index: usize) -> &[u8] {
178-
self.value_field().as_binary_view().value(index).as_ref()
178+
self.value_field().as_binary_view().value(index)
179179
}
180180

181181
/// Get the field names for an object at the given index

parquet-variant/src/builder.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,9 @@ impl ValueBuffer {
305305
///
306306
/// This method will panic if the variant contains duplicate field names in objects
307307
/// when validation is enabled. For a fallible version, use [`ValueBuffer::try_append_variant`]
308-
fn append_variant<'m, 'd>(
308+
fn append_variant(
309309
&mut self,
310-
variant: Variant<'m, 'd>,
310+
variant: Variant<'_, '_>,
311311
metadata_builder: &mut MetadataBuilder,
312312
) {
313313
match variant {
@@ -335,9 +335,9 @@ impl ValueBuffer {
335335
}
336336

337337
/// Appends a variant to the buffer
338-
fn try_append_variant<'m, 'd>(
338+
fn try_append_variant(
339339
&mut self,
340-
variant: Variant<'m, 'd>,
340+
variant: Variant<'_, '_>,
341341
metadata_builder: &mut MetadataBuilder,
342342
) -> Result<(), ArrowError> {
343343
match variant {

parquet-variant/src/path.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl<'a> From<&'a str> for VariantPath<'a> {
103103
}
104104

105105
/// Create from usize
106-
impl<'a> From<usize> for VariantPath<'a> {
106+
impl From<usize> for VariantPath<'_> {
107107
fn from(index: usize) -> Self {
108108
VariantPath::new(vec![VariantPathElement::index(index)])
109109
}
@@ -152,7 +152,7 @@ impl<'a> From<&'a str> for VariantPathElement<'a> {
152152
}
153153
}
154154

155-
impl<'a> From<String> for VariantPathElement<'a> {
155+
impl From<String> for VariantPathElement<'_> {
156156
fn from(name: String) -> Self {
157157
VariantPathElement::field(Cow::Owned(name))
158158
}
@@ -164,7 +164,7 @@ impl<'a> From<&'a String> for VariantPathElement<'a> {
164164
}
165165
}
166166

167-
impl<'a> From<usize> for VariantPathElement<'a> {
167+
impl From<usize> for VariantPathElement<'_> {
168168
fn from(index: usize) -> Self {
169169
VariantPathElement::index(index)
170170
}

parquet-variant/src/variant/object.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ impl<'m, 'v> VariantObject<'m, 'v> {
410410
//
411411
// Instead of comparing the raw bytes of 2 variant objects, this implementation recursively
412412
// checks whether the field values are equal -- regardless of their order
413-
impl<'m, 'v> PartialEq for VariantObject<'m, 'v> {
413+
impl PartialEq for VariantObject<'_, '_> {
414414
fn eq(&self, other: &Self) -> bool {
415415
if self.num_elements != other.num_elements {
416416
return false;

0 commit comments

Comments
 (0)