This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fury.git
The following commit(s) were added to refs/heads/main by this push:
new 5a368e17 chore(Rust): fix lint problems (#1962)
5a368e17 is described below
commit 5a368e171ca9adc765db246f6a099f78d7bd48da
Author: weipeng <[email protected]>
AuthorDate: Sun Dec 1 18:56:03 2024 +0800
chore(Rust): fix lint problems (#1962)
## What does this PR do?
Fix the lint warnings in issue #1961 which was caused by the upgrade of
clippy.
## Related issues
#1961
## Does this PR introduce any user-facing change?
## Benchmark
---
rust/fury-core/src/row/row.rs | 6 +++---
rust/fury-core/src/row/writer.rs | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/rust/fury-core/src/row/row.rs b/rust/fury-core/src/row/row.rs
index f71f7bc3..55d4d946 100644
--- a/rust/fury-core/src/row/row.rs
+++ b/rust/fury-core/src/row/row.rs
@@ -74,7 +74,7 @@ impl<'a> Row<'a> for String {
}
}
-impl<'a> Row<'a> for bool {
+impl Row<'_> for bool {
type ReadResult = Self;
fn write(v: &Self, writer: &mut Writer) {
@@ -86,7 +86,7 @@ impl<'a> Row<'a> for bool {
}
}
-impl<'a> Row<'a> for NaiveDate {
+impl Row<'_> for NaiveDate {
type ReadResult = Result<NaiveDate, Error>;
fn write(v: &Self, writer: &mut Writer) {
@@ -104,7 +104,7 @@ impl<'a> Row<'a> for NaiveDate {
}
}
-impl<'a> Row<'a> for NaiveDateTime {
+impl Row<'_> for NaiveDateTime {
type ReadResult = Result<NaiveDateTime, Error>;
fn write(v: &Self, writer: &mut Writer) {
diff --git a/rust/fury-core/src/row/writer.rs b/rust/fury-core/src/row/writer.rs
index cc466811..2621c41e 100644
--- a/rust/fury-core/src/row/writer.rs
+++ b/rust/fury-core/src/row/writer.rs
@@ -35,7 +35,7 @@ impl<'a> FieldWriterHelper<'a> {
writer: &'a mut Writer,
base_offset: usize,
get_field_offset: Box<dyn Fn(usize) -> usize>,
- ) -> FieldWriterHelper {
+ ) -> FieldWriterHelper<'a> {
FieldWriterHelper {
writer,
base_offset,
@@ -67,7 +67,7 @@ pub struct StructWriter<'a> {
field_writer_helper: FieldWriterHelper<'a>,
}
-impl<'a> StructWriter<'a> {
+impl StructWriter<'_> {
fn get_fixed_size(bit_map_width_in_bytes: usize, num_fields: usize) ->
usize {
bit_map_width_in_bytes + num_fields * 8
}
@@ -105,7 +105,7 @@ pub struct ArrayWriter<'a> {
field_writer_helper: FieldWriterHelper<'a>,
}
-impl<'a> ArrayWriter<'a> {
+impl ArrayWriter<'_> {
fn get_fixed_size(bit_map_width_in_bytes: usize, num_fields: usize) ->
usize {
8 + bit_map_width_in_bytes + num_fields * 8
}
@@ -148,7 +148,7 @@ pub struct MapWriter<'a> {
writer: &'a mut Writer,
}
-impl<'a> MapWriter<'a> {
+impl MapWriter<'_> {
fn get_fixed_size(&self) -> usize {
// key_byte_size
8
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]