diff --git a/rust/lance-arrow/src/bfloat16.rs b/rust/lance-arrow/src/bfloat16.rs index 467da00a5a..06079d9baa 100644 --- a/rust/lance-arrow/src/bfloat16.rs +++ b/rust/lance-arrow/src/bfloat16.rs @@ -90,7 +90,7 @@ impl BFloat16Array { } } -impl<'a> ArrayAccessor for &'a BFloat16Array { +impl ArrayAccessor for &BFloat16Array { type Item = bf16; fn value(&self, index: usize) -> Self::Item { diff --git a/rust/lance-core/src/utils/bit.rs b/rust/lance-core/src/utils/bit.rs index 75a13e783a..7d69fee8da 100644 --- a/rust/lance-core/src/utils/bit.rs +++ b/rust/lance-core/src/utils/bit.rs @@ -60,7 +60,6 @@ pub fn log_2_ceil(val: u32) -> u32 { } #[cfg(test)] - pub mod tests { use crate::utils::bit::log_2_ceil; diff --git a/rust/lance-core/src/utils/deletion.rs b/rust/lance-core/src/utils/deletion.rs index 1735f90b8c..44e1b79a19 100644 --- a/rust/lance-core/src/utils/deletion.rs +++ b/rust/lance-core/src/utils/deletion.rs @@ -194,7 +194,6 @@ impl Extend for DeletionVector { /// pub fn get(i: u32) -> bool { ... } /// } /// impl BitAnd for DeletionVector { ... } - impl IntoIterator for DeletionVector { type IntoIter = Box + Send>; type Item = u32; diff --git a/rust/lance-core/src/utils/futures.rs b/rust/lance-core/src/utils/futures.rs index 9acce93ce2..2267f600e7 100644 --- a/rust/lance-core/src/utils/futures.rs +++ b/rust/lance-core/src/utils/futures.rs @@ -74,7 +74,7 @@ impl<'a, T: Clone> SharedStream<'a, T> { } } -impl<'a, T: Clone> Stream for SharedStream<'a, T> { +impl Stream for SharedStream<'_, T> { type Item = T; fn poll_next( diff --git a/rust/lance-core/src/utils/hash.rs b/rust/lance-core/src/utils/hash.rs index 58e6fd47bf..14ef805a58 100644 --- a/rust/lance-core/src/utils/hash.rs +++ b/rust/lance-core/src/utils/hash.rs @@ -7,13 +7,13 @@ use std::hash::Hasher; // the equality for this `U8SliceKey` means that the &[u8] contents are equal. #[derive(Eq)] pub struct U8SliceKey<'a>(pub &'a [u8]); -impl<'a> PartialEq for U8SliceKey<'a> { +impl PartialEq for U8SliceKey<'_> { fn eq(&self, other: &Self) -> bool { self.0 == other.0 } } -impl<'a> std::hash::Hash for U8SliceKey<'a> { +impl std::hash::Hash for U8SliceKey<'_> { fn hash(&self, state: &mut H) { self.0.hash(state); } diff --git a/rust/lance-core/src/utils/testing.rs b/rust/lance-core/src/utils/testing.rs index 9746787f71..f111236486 100644 --- a/rust/lance-core/src/utils/testing.rs +++ b/rust/lance-core/src/utils/testing.rs @@ -218,7 +218,7 @@ impl Default for MockClock<'_> { } } -impl<'a> MockClock<'a> { +impl MockClock<'_> { pub fn new() -> Self { Default::default() } @@ -228,7 +228,7 @@ impl<'a> MockClock<'a> { } } -impl<'a> Drop for MockClock<'a> { +impl Drop for MockClock<'_> { fn drop(&mut self) { // Reset the clock to the epoch mock_instant::MockClock::set_system_time(TimeDelta::try_days(0).unwrap().to_std().unwrap()); diff --git a/rust/lance-encoding/benches/decoder.rs b/rust/lance-encoding/benches/decoder.rs index c6a80538a8..500274fa34 100644 --- a/rust/lance-encoding/benches/decoder.rs +++ b/rust/lance-encoding/benches/decoder.rs @@ -299,6 +299,7 @@ fn bench_decode_packed_struct(c: &mut Criterion) { }); } +#[allow(dead_code)] fn bench_decode_str_with_fixed_size_binary_encoding(c: &mut Criterion) { let rt = tokio::runtime::Runtime::new().unwrap(); let mut group = c.benchmark_group("decode_primitive"); diff --git a/rust/lance-encoding/src/encodings/logical/binary.rs b/rust/lance-encoding/src/encodings/logical/binary.rs index 1791f31b15..a08d6d8af6 100644 --- a/rust/lance-encoding/src/encodings/logical/binary.rs +++ b/rust/lance-encoding/src/encodings/logical/binary.rs @@ -27,7 +27,7 @@ pub struct BinarySchedulingJob<'a> { inner: Box, } -impl<'a> SchedulingJob for BinarySchedulingJob<'a> { +impl SchedulingJob for BinarySchedulingJob<'_> { fn schedule_next( &mut self, context: &mut SchedulerContext, diff --git a/rust/lance-encoding/src/encodings/logical/blob.rs b/rust/lance-encoding/src/encodings/logical/blob.rs index ea26cb84e2..77ba8c48e4 100644 --- a/rust/lance-encoding/src/encodings/logical/blob.rs +++ b/rust/lance-encoding/src/encodings/logical/blob.rs @@ -57,7 +57,7 @@ struct BlobFieldSchedulingJob<'a> { descriptions_job: Box, } -impl<'a> SchedulingJob for BlobFieldSchedulingJob<'a> { +impl SchedulingJob for BlobFieldSchedulingJob<'_> { fn schedule_next( &mut self, context: &mut SchedulerContext, diff --git a/rust/lance-encoding/src/encodings/logical/list.rs b/rust/lance-encoding/src/encodings/logical/list.rs index cfe6a7b143..8522c217d2 100644 --- a/rust/lance-encoding/src/encodings/logical/list.rs +++ b/rust/lance-encoding/src/encodings/logical/list.rs @@ -424,7 +424,7 @@ impl<'a> ListFieldSchedulingJob<'a> { } } -impl<'a> SchedulingJob for ListFieldSchedulingJob<'a> { +impl SchedulingJob for ListFieldSchedulingJob<'_> { fn schedule_next( &mut self, context: &mut SchedulerContext, diff --git a/rust/lance-encoding/src/encodings/logical/primitive.rs b/rust/lance-encoding/src/encodings/logical/primitive.rs index e73cd2b282..ca30e03dd7 100644 --- a/rust/lance-encoding/src/encodings/logical/primitive.rs +++ b/rust/lance-encoding/src/encodings/logical/primitive.rs @@ -141,7 +141,7 @@ impl<'a> PrimitiveFieldSchedulingJob<'a> { } } -impl<'a> SchedulingJob for PrimitiveFieldSchedulingJob<'a> { +impl SchedulingJob for PrimitiveFieldSchedulingJob<'_> { fn schedule_next( &mut self, context: &mut SchedulerContext, @@ -1148,7 +1148,7 @@ impl<'a> StructuralPrimitiveFieldSchedulingJob<'a> { } } -impl<'a> StructuralSchedulingJob for StructuralPrimitiveFieldSchedulingJob<'a> { +impl StructuralSchedulingJob for StructuralPrimitiveFieldSchedulingJob<'_> { fn schedule_next( &mut self, context: &mut SchedulerContext, diff --git a/rust/lance-encoding/src/encodings/logical/struct.rs b/rust/lance-encoding/src/encodings/logical/struct.rs index a4cc44afc7..1416b88ede 100644 --- a/rust/lance-encoding/src/encodings/logical/struct.rs +++ b/rust/lance-encoding/src/encodings/logical/struct.rs @@ -42,21 +42,21 @@ struct SchedulingJobWithStatus<'a> { rows_remaining: u64, } -impl<'a> PartialEq for SchedulingJobWithStatus<'a> { +impl PartialEq for SchedulingJobWithStatus<'_> { fn eq(&self, other: &Self) -> bool { self.col_idx == other.col_idx } } -impl<'a> Eq for SchedulingJobWithStatus<'a> {} +impl Eq for SchedulingJobWithStatus<'_> {} -impl<'a> PartialOrd for SchedulingJobWithStatus<'a> { +impl PartialOrd for SchedulingJobWithStatus<'_> { fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } } -impl<'a> Ord for SchedulingJobWithStatus<'a> { +impl Ord for SchedulingJobWithStatus<'_> { fn cmp(&self, other: &Self) -> std::cmp::Ordering { // Note this is reversed to make it min-heap other.rows_scheduled.cmp(&self.rows_scheduled) @@ -106,7 +106,7 @@ impl<'a> SimpleStructSchedulerJob<'a> { } } -impl<'a> SchedulingJob for SimpleStructSchedulerJob<'a> { +impl SchedulingJob for SimpleStructSchedulerJob<'_> { fn schedule_next( &mut self, mut context: &mut SchedulerContext, @@ -239,21 +239,21 @@ struct StructuralSchedulingJobWithStatus<'a> { rows_remaining: u64, } -impl<'a> PartialEq for StructuralSchedulingJobWithStatus<'a> { +impl PartialEq for StructuralSchedulingJobWithStatus<'_> { fn eq(&self, other: &Self) -> bool { self.col_idx == other.col_idx } } -impl<'a> Eq for StructuralSchedulingJobWithStatus<'a> {} +impl Eq for StructuralSchedulingJobWithStatus<'_> {} -impl<'a> PartialOrd for StructuralSchedulingJobWithStatus<'a> { +impl PartialOrd for StructuralSchedulingJobWithStatus<'_> { fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } } -impl<'a> Ord for StructuralSchedulingJobWithStatus<'a> { +impl Ord for StructuralSchedulingJobWithStatus<'_> { fn cmp(&self, other: &Self) -> std::cmp::Ordering { // Note this is reversed to make it min-heap other.rows_scheduled.cmp(&self.rows_scheduled) @@ -297,7 +297,7 @@ impl<'a> RepDefStructSchedulingJob<'a> { } } -impl<'a> StructuralSchedulingJob for RepDefStructSchedulingJob<'a> { +impl StructuralSchedulingJob for RepDefStructSchedulingJob<'_> { fn schedule_next( &mut self, mut context: &mut SchedulerContext, diff --git a/rust/lance-encoding/src/encodings/physical/bitpack_fastlanes.rs b/rust/lance-encoding/src/encodings/physical/bitpack_fastlanes.rs index 72f540249f..9449360083 100644 --- a/rust/lance-encoding/src/encodings/physical/bitpack_fastlanes.rs +++ b/rust/lance-encoding/src/encodings/physical/bitpack_fastlanes.rs @@ -204,7 +204,7 @@ pub fn compute_compressed_bit_width_for_non_neg(arrays: &[ArrayRef]) -> u64 { // It outputs an fastlanes bitpacked EncodedArray macro_rules! encode_fixed_width { ($self:expr, $unpacked:expr, $data_type:ty, $buffer_index:expr) => {{ - let num_chunks = ($unpacked.num_values + ELEMS_PER_CHUNK - 1) / ELEMS_PER_CHUNK; + let num_chunks = $unpacked.num_values.div_ceil(ELEMS_PER_CHUNK); let num_full_chunks = $unpacked.num_values / ELEMS_PER_CHUNK; let uncompressed_bit_width = std::mem::size_of::<$data_type>() as u64 * 8; diff --git a/rust/lance-file/src/writer/statistics.rs b/rust/lance-file/src/writer/statistics.rs index 2ef4d081d4..7ba7c4a909 100644 --- a/rust/lance-file/src/writer/statistics.rs +++ b/rust/lance-file/src/writer/statistics.rs @@ -486,7 +486,7 @@ fn get_boolean_statistics(arrays: &[&ArrayRef]) -> StatisticsRow { fn cast_dictionary_arrays<'a, T: ArrowDictionaryKeyType + 'static>( arrays: &'a [&'a ArrayRef], -) -> Vec<&Arc> { +) -> Vec<&'a Arc> { arrays .iter() .map(|x| x.as_dictionary::().values()) diff --git a/rust/lance-index/src/scalar/label_list.rs b/rust/lance-index/src/scalar/label_list.rs index 0d487e5936..a54fcf9ed5 100644 --- a/rust/lance-index/src/scalar/label_list.rs +++ b/rust/lance-index/src/scalar/label_list.rs @@ -78,7 +78,7 @@ impl LabelListIndex { fn search_values<'a>( &'a self, values: &'a Vec, - ) -> BoxStream> { + ) -> BoxStream<'a, Result> { futures::stream::iter(values) .then(move |value| { let value_query = SargableQuery::Equals(value.clone()); diff --git a/rust/lance-index/src/vector/graph.rs b/rust/lance-index/src/vector/graph.rs index 9e79dc231a..e31ab4d344 100644 --- a/rust/lance-index/src/vector/graph.rs +++ b/rust/lance-index/src/vector/graph.rs @@ -152,7 +152,7 @@ pub struct Visited<'a> { recently_visited: Vec, } -impl<'a> Visited<'a> { +impl Visited<'_> { pub fn insert(&mut self, node_id: u32) { let node_id_usize = node_id as usize; if !self.visited[node_id_usize] { @@ -171,7 +171,7 @@ impl<'a> Visited<'a> { } } -impl<'a> Drop for Visited<'a> { +impl Drop for Visited<'_> { fn drop(&mut self) { for node_id in self.recently_visited.iter() { self.visited.set(*node_id as usize, false); diff --git a/rust/lance-index/src/vector/hnsw/builder.rs b/rust/lance-index/src/vector/hnsw/builder.rs index fc5e43a1b8..a30bbf993c 100644 --- a/rust/lance-index/src/vector/hnsw/builder.rs +++ b/rust/lance-index/src/vector/hnsw/builder.rs @@ -507,7 +507,7 @@ impl<'a> HnswLevelView<'a> { } } -impl<'a> Graph for HnswLevelView<'a> { +impl Graph for HnswLevelView<'_> { fn len(&self) -> usize { self.nodes.len() } @@ -528,7 +528,7 @@ impl<'a> HnswBottomView<'a> { } } -impl<'a> Graph for HnswBottomView<'a> { +impl Graph for HnswBottomView<'_> { fn len(&self) -> usize { self.nodes.len() } @@ -544,7 +544,7 @@ pub struct HnswQueryParams { pub ef: usize, } -impl<'a> From<&'a Query> for HnswQueryParams { +impl From<&Query> for HnswQueryParams { fn from(query: &Query) -> Self { let k = query.k * query.refine_factor.unwrap_or(1) as usize; Self { diff --git a/rust/lance-index/src/vector/ivf/shuffler.rs b/rust/lance-index/src/vector/ivf/shuffler.rs index 2f6d97ed7f..f1d0b16960 100644 --- a/rust/lance-index/src/vector/ivf/shuffler.rs +++ b/rust/lance-index/src/vector/ivf/shuffler.rs @@ -739,11 +739,7 @@ impl IvfShuffler { continue; } - let local_start = if start < cur_start { - 0 - } else { - start - cur_start - }; + let local_start = start.saturating_sub(cur_start); let local_end = std::cmp::min(end - cur_start, *partition_size); input.push(ShuffleInput { diff --git a/rust/lance-index/src/vector/sq/storage.rs b/rust/lance-index/src/vector/sq/storage.rs index 4428cfcd76..eaaa486f23 100644 --- a/rust/lance-index/src/vector/sq/storage.rs +++ b/rust/lance-index/src/vector/sq/storage.rs @@ -398,7 +398,7 @@ impl<'a> SQDistCalculator<'a> { } } -impl<'a> DistCalculator for SQDistCalculator<'a> { +impl DistCalculator for SQDistCalculator<'_> { fn distance(&self, id: u32) -> f32 { let (offset, chunk) = self.storage.chunk(id); let sq_code = chunk.sq_code_slice(id - offset); diff --git a/rust/lance-io/src/encodings/binary.rs b/rust/lance-io/src/encodings/binary.rs index f8187a3717..8eccf95532 100644 --- a/rust/lance-io/src/encodings/binary.rs +++ b/rust/lance-io/src/encodings/binary.rs @@ -88,7 +88,7 @@ impl<'a> BinaryEncoder<'a> { } #[async_trait] -impl<'a> Encoder for BinaryEncoder<'a> { +impl Encoder for BinaryEncoder<'_> { async fn encode(&mut self, arrs: &[&dyn Array]) -> Result { assert!(!arrs.is_empty()); let data_type = arrs[0].data_type(); @@ -286,7 +286,7 @@ fn plan_take_chunks( } #[async_trait] -impl<'a, T: ByteArrayType> Decoder for BinaryDecoder<'a, T> { +impl Decoder for BinaryDecoder<'_, T> { async fn decode(&self) -> Result { self.get(..).await } @@ -394,7 +394,7 @@ impl<'a, T: ByteArrayType> Decoder for BinaryDecoder<'a, T> { } #[async_trait] -impl<'a, T: ByteArrayType> AsyncIndex for BinaryDecoder<'a, T> { +impl AsyncIndex for BinaryDecoder<'_, T> { type Output = Result; async fn get(&self, index: usize) -> Self::Output { @@ -403,7 +403,7 @@ impl<'a, T: ByteArrayType> AsyncIndex for BinaryDecoder<'a, T> { } #[async_trait] -impl<'a, T: ByteArrayType> AsyncIndex> for BinaryDecoder<'a, T> { +impl AsyncIndex> for BinaryDecoder<'_, T> { type Output = Result; async fn get(&self, index: RangeFrom) -> Self::Output { @@ -412,7 +412,7 @@ impl<'a, T: ByteArrayType> AsyncIndex> for BinaryDecoder<'a, T> } #[async_trait] -impl<'a, T: ByteArrayType> AsyncIndex> for BinaryDecoder<'a, T> { +impl AsyncIndex> for BinaryDecoder<'_, T> { type Output = Result; async fn get(&self, index: RangeTo) -> Self::Output { @@ -421,7 +421,7 @@ impl<'a, T: ByteArrayType> AsyncIndex> for BinaryDecoder<'a, T> { } #[async_trait] -impl<'a, T: ByteArrayType> AsyncIndex for BinaryDecoder<'a, T> { +impl AsyncIndex for BinaryDecoder<'_, T> { type Output = Result; async fn get(&self, _: RangeFull) -> Self::Output { @@ -430,7 +430,7 @@ impl<'a, T: ByteArrayType> AsyncIndex for BinaryDecoder<'a, T> { } #[async_trait] -impl<'a, T: ByteArrayType> AsyncIndex for BinaryDecoder<'a, T> { +impl AsyncIndex for BinaryDecoder<'_, T> { type Output = Result; async fn get(&self, params: ReadBatchParams) -> Self::Output { @@ -445,7 +445,7 @@ impl<'a, T: ByteArrayType> AsyncIndex for BinaryDecoder<'a, T> } #[async_trait] -impl<'a, T: ByteArrayType> AsyncIndex> for BinaryDecoder<'a, T> { +impl AsyncIndex> for BinaryDecoder<'_, T> { type Output = Result; async fn get(&self, index: Range) -> Self::Output { diff --git a/rust/lance-io/src/encodings/dictionary.rs b/rust/lance-io/src/encodings/dictionary.rs index 72b150e023..494b439cfd 100644 --- a/rust/lance-io/src/encodings/dictionary.rs +++ b/rust/lance-io/src/encodings/dictionary.rs @@ -62,7 +62,7 @@ impl<'a> DictionaryEncoder<'a> { } #[async_trait] -impl<'a> Encoder for DictionaryEncoder<'a> { +impl Encoder for DictionaryEncoder<'_> { async fn encode(&mut self, array: &[&dyn Array]) -> Result { use DataType::*; @@ -171,7 +171,7 @@ impl<'a> DictionaryDecoder<'a> { } #[async_trait] -impl<'a> Decoder for DictionaryDecoder<'a> { +impl Decoder for DictionaryDecoder<'_> { async fn decode(&self) -> Result { self.decode_impl(..).await } @@ -182,7 +182,7 @@ impl<'a> Decoder for DictionaryDecoder<'a> { } #[async_trait] -impl<'a> AsyncIndex for DictionaryDecoder<'a> { +impl AsyncIndex for DictionaryDecoder<'_> { type Output = Result; async fn get(&self, _index: usize) -> Self::Output { @@ -196,7 +196,7 @@ impl<'a> AsyncIndex for DictionaryDecoder<'a> { } #[async_trait] -impl<'a> AsyncIndex for DictionaryDecoder<'a> { +impl AsyncIndex for DictionaryDecoder<'_> { type Output = Result; async fn get(&self, params: ReadBatchParams) -> Self::Output { diff --git a/rust/lance-io/src/encodings/plain.rs b/rust/lance-io/src/encodings/plain.rs index 4f77fde5c7..9951e21374 100644 --- a/rust/lance-io/src/encodings/plain.rs +++ b/rust/lance-io/src/encodings/plain.rs @@ -401,7 +401,7 @@ fn make_chunked_requests( } #[async_trait] -impl<'a> Decoder for PlainDecoder<'a> { +impl Decoder for PlainDecoder<'_> { async fn decode(&self) -> Result { self.get(0..self.length).await } diff --git a/rust/lance-io/src/object_store.rs b/rust/lance-io/src/object_store.rs index f668cdfaae..80bfea8726 100644 --- a/rust/lance-io/src/object_store.rs +++ b/rust/lance-io/src/object_store.rs @@ -58,20 +58,20 @@ pub trait ObjectStoreExt { /// Read all files (start from base directory) recursively /// /// unmodified_since can be specified to only return files that have not been modified since the given time. - async fn read_dir_all( - &self, + async fn read_dir_all<'a>( + &'a self, dir_path: impl Into<&Path> + Send, unmodified_since: Option>, - ) -> Result>>; + ) -> Result>>; } #[async_trait] impl ObjectStoreExt for O { - async fn read_dir_all( - &self, + async fn read_dir_all<'a>( + &'a self, dir_path: impl Into<&Path> + Send, unmodified_since: Option>, - ) -> Result>> { + ) -> Result>> { let mut output = self.list(Some(dir_path.into())); if let Some(unmodified_since_val) = unmodified_since { output = output @@ -652,7 +652,7 @@ impl ObjectStore { pub fn remove_stream<'a>( &'a self, locations: BoxStream<'a, Result>, - ) -> BoxStream> { + ) -> BoxStream<'a, Result> { self.inner .delete_stream(locations.err_into::().boxed()) .err_into::() diff --git a/rust/lance-io/src/scheduler.rs b/rust/lance-io/src/scheduler.rs index b6cfff300a..7fc11da709 100644 --- a/rust/lance-io/src/scheduler.rs +++ b/rust/lance-io/src/scheduler.rs @@ -64,7 +64,7 @@ struct IopsReservation<'a> { value: Option>, } -impl<'a> IopsReservation<'a> { +impl IopsReservation<'_> { // Forget the reservation, so it won't be released on drop fn forget(&mut self) { if let Some(value) = self.value.take() { diff --git a/rust/lance-io/src/utils.rs b/rust/lance-io/src/utils.rs index 37253339a5..1f2f45b83c 100644 --- a/rust/lance-io/src/utils.rs +++ b/rust/lance-io/src/utils.rs @@ -118,11 +118,7 @@ pub async fn read_struct< pub async fn read_last_block(reader: &dyn Reader) -> object_store::Result { let file_size = reader.size().await?; let block_size = reader.block_size(); - let begin = if file_size < block_size { - 0 - } else { - file_size - block_size - }; + let begin = file_size.saturating_sub(block_size); reader.get_range(begin..file_size).await } diff --git a/rust/lance-linalg/src/simd.rs b/rust/lance-linalg/src/simd.rs index 74c3b56d3b..ff95164c75 100644 --- a/rust/lance-linalg/src/simd.rs +++ b/rust/lance-linalg/src/simd.rs @@ -42,7 +42,6 @@ pub trait SIMD: fn zeros() -> Self; /// Gather elements from the slice, using i32 indices. - /// Load aligned data from aligned memory. /// /// # Safety diff --git a/rust/lance-linalg/src/simd/f32.rs b/rust/lance-linalg/src/simd/f32.rs index 8deb50338b..8091bc83a1 100644 --- a/rust/lance-linalg/src/simd/f32.rs +++ b/rust/lance-linalg/src/simd/f32.rs @@ -485,7 +485,6 @@ impl<'a> From<&'a [f32; 16]> for f32x16 { impl SIMD for f32x16 { #[inline] - fn splat(val: f32) -> Self { #[cfg(all(target_arch = "x86_64", target_feature = "avx512f"))] unsafe { @@ -602,7 +601,6 @@ impl SIMD for f32x16 { } #[inline] - unsafe fn store_unaligned(&self, ptr: *mut f32) { #[cfg(all(target_arch = "x86_64", target_feature = "avx512f"))] unsafe { diff --git a/rust/lance-table/src/rowids.rs b/rust/lance-table/src/rowids.rs index 38ee381f8d..1375f0526f 100644 --- a/rust/lance-table/src/rowids.rs +++ b/rust/lance-table/src/rowids.rs @@ -343,7 +343,7 @@ pub struct RowIdSeqSlice<'a> { offset_last: usize, } -impl<'a> RowIdSeqSlice<'a> { +impl RowIdSeqSlice<'_> { pub fn iter(&self) -> impl Iterator + '_ { let mut known_size = self.segments.iter().map(|segment| segment.len()).sum(); known_size -= self.offset_start; diff --git a/rust/lance-table/src/rowids/bitmap.rs b/rust/lance-table/src/rowids/bitmap.rs index dc628ddcf8..97777af5be 100644 --- a/rust/lance-table/src/rowids/bitmap.rs +++ b/rust/lance-table/src/rowids/bitmap.rs @@ -92,7 +92,7 @@ pub struct BitmapSlice<'a> { len: usize, } -impl<'a> BitmapSlice<'a> { +impl BitmapSlice<'_> { pub fn count_ones(&self) -> usize { if self.len == 0 { return 0; @@ -138,7 +138,7 @@ impl<'a> BitmapSlice<'a> { } } -impl<'a> From> for Bitmap { +impl From> for Bitmap { fn from(slice: BitmapSlice) -> Self { let mut bitmap = Self::new_empty(slice.len); for i in 0..slice.len { diff --git a/rust/lance/src/dataset/optimize/remapping.rs b/rust/lance/src/dataset/optimize/remapping.rs index 026cbcc356..4b09bf7b3f 100644 --- a/rust/lance/src/dataset/optimize/remapping.rs +++ b/rust/lance/src/dataset/optimize/remapping.rs @@ -95,7 +95,7 @@ impl<'a, I: Iterator> MissingIds<'a, I> { } } -impl<'a, I: Iterator> Iterator for MissingIds<'a, I> { +impl> Iterator for MissingIds<'_, I> { type Item = u64; fn next(&mut self) -> Option { diff --git a/rust/lance/src/index/scalar.rs b/rust/lance/src/index/scalar.rs index 8efa3ec829..c0394bdb65 100644 --- a/rust/lance/src/index/scalar.rs +++ b/rust/lance/src/index/scalar.rs @@ -87,7 +87,6 @@ impl TrainingRequest { // to make index types "generic" and "pluggable". We will need to create some // kind of core proto for scalar indices that the scanner can read to determine // how and when to use a scalar index. - pub trait ScalarIndexDetails { fn get_type(&self) -> ScalarIndexType; } diff --git a/rust/lance/src/io/exec/scalar_index.rs b/rust/lance/src/io/exec/scalar_index.rs index 0f39ed6124..319b4870af 100644 --- a/rust/lance/src/io/exec/scalar_index.rs +++ b/rust/lance/src/io/exec/scalar_index.rs @@ -362,7 +362,7 @@ impl<'a> FragIdIter<'a> { } } -impl<'a> Iterator for FragIdIter<'a> { +impl Iterator for FragIdIter<'_> { type Item = u64; fn next(&mut self) -> Option {