From 69c123031a63f4f3eed68cdb27297c87dee65e67 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Fri, 1 Jul 2022 11:35:27 -0400 Subject: [PATCH] fix: Remove unused lifetime declarations clippy found --- packers/src/packers.rs | 2 +- read_buffer/src/column/encoding/string/dictionary.rs | 10 +++++----- read_buffer/src/column/encoding/string/rle.rs | 10 +++++----- read_buffer/src/row_group.rs | 2 +- read_buffer/src/value.rs | 2 +- test_helpers/src/tracing.rs | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packers/src/packers.rs b/packers/src/packers.rs index cffa3771a7..5ddd33a53e 100644 --- a/packers/src/packers.rs +++ b/packers/src/packers.rs @@ -48,7 +48,7 @@ macro_rules! typed_packer_accessors { }; } -impl<'a> Packers { +impl Packers { pub fn chunk_values(&self, chunk_size: usize) -> PackerChunker<'_> { match self { Self::Float(p) => PackerChunker::Float(p.values.chunks(chunk_size)), diff --git a/read_buffer/src/column/encoding/string/dictionary.rs b/read_buffer/src/column/encoding/string/dictionary.rs index 6526fbb99e..88abc94167 100644 --- a/read_buffer/src/column/encoding/string/dictionary.rs +++ b/read_buffer/src/column/encoding/string/dictionary.rs @@ -792,7 +792,7 @@ impl Dictionary { } } -impl<'a> From> for Dictionary { +impl From> for Dictionary { fn from(vec: Vec<&str>) -> Self { let mut enc = Self::default(); for v in vec { @@ -802,7 +802,7 @@ impl<'a> From> for Dictionary { } } -impl<'a> From> for Dictionary { +impl From> for Dictionary { fn from(vec: Vec) -> Self { let mut enc = Self::default(); for v in vec { @@ -812,7 +812,7 @@ impl<'a> From> for Dictionary { } } -impl<'a> From>> for Dictionary { +impl From>> for Dictionary { fn from(vec: Vec>) -> Self { let mut drle = Self::default(); for v in vec { @@ -825,7 +825,7 @@ impl<'a> From>> for Dictionary { } } -impl<'a> From>> for Dictionary { +impl From>> for Dictionary { fn from(vec: Vec>) -> Self { let mut drle = Self::default(); for v in vec { @@ -838,7 +838,7 @@ impl<'a> From>> for Dictionary { } } -impl<'a> From for Dictionary { +impl From for Dictionary { fn from(arr: StringArray) -> Self { let mut drle = Self::default(); for i in 0..arr.len() { diff --git a/read_buffer/src/column/encoding/string/rle.rs b/read_buffer/src/column/encoding/string/rle.rs index 5c304a46c3..eb596ea27d 100644 --- a/read_buffer/src/column/encoding/string/rle.rs +++ b/read_buffer/src/column/encoding/string/rle.rs @@ -901,7 +901,7 @@ impl RLE { } } -impl<'a> From> for RLE { +impl From> for RLE { fn from(vec: Vec<&str>) -> Self { let mut drle = Self::default(); for v in vec { @@ -911,7 +911,7 @@ impl<'a> From> for RLE { } } -impl<'a> From> for RLE { +impl From> for RLE { fn from(vec: Vec) -> Self { let mut drle = Self::default(); for v in vec { @@ -921,7 +921,7 @@ impl<'a> From> for RLE { } } -impl<'a> From>> for RLE { +impl From>> for RLE { fn from(vec: Vec>) -> Self { let mut drle = Self::default(); for v in vec { @@ -934,7 +934,7 @@ impl<'a> From>> for RLE { } } -impl<'a> From>> for RLE { +impl From>> for RLE { fn from(vec: Vec>) -> Self { let mut drle = Self::default(); for v in vec { @@ -947,7 +947,7 @@ impl<'a> From>> for RLE { } } -impl<'a> From for RLE { +impl From for RLE { fn from(arr: StringArray) -> Self { let mut drle = Self::default(); for i in 0..arr.len() { diff --git a/read_buffer/src/row_group.rs b/read_buffer/src/row_group.rs index 8cec3b7776..4e7473d817 100644 --- a/read_buffer/src/row_group.rs +++ b/read_buffer/src/row_group.rs @@ -1480,7 +1480,7 @@ pub enum Literal { Boolean(bool), } -impl<'a> TryFrom<&DFScalarValue> for Literal { +impl TryFrom<&DFScalarValue> for Literal { type Error = String; fn try_from(value: &DFScalarValue) -> Result { diff --git a/read_buffer/src/value.rs b/read_buffer/src/value.rs index 1e8c0bb29d..05ecf7e1dc 100644 --- a/read_buffer/src/value.rs +++ b/read_buffer/src/value.rs @@ -1077,7 +1077,7 @@ impl std::ops::AddAssign<&Self> for Scalar { } } -impl<'a> std::ops::AddAssign<&Scalar> for &mut Scalar { +impl std::ops::AddAssign<&Scalar> for &mut Scalar { fn add_assign(&mut self, rhs: &Scalar) { match self { Scalar::F64(v) => { diff --git a/test_helpers/src/tracing.rs b/test_helpers/src/tracing.rs index bbe73faa84..baa636cb46 100644 --- a/test_helpers/src/tracing.rs +++ b/test_helpers/src/tracing.rs @@ -84,7 +84,7 @@ struct StringVisitor { string: String, } -impl<'a> tracing::field::Visit for StringVisitor { +impl tracing::field::Visit for StringVisitor { fn record_debug(&mut self, field: &Field, value: &dyn fmt::Debug) { use std::fmt::Write; write!(self.string, "{} = {:?}; ", field.name(), value).unwrap();