Skip to content

Commit

Permalink
chore(Rust): fix lint problems (#1962)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
theweipeng authored and chaokunyang committed Feb 7, 2025
1 parent 56783b7 commit f06a7ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions rust/fury-core/src/row/row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions rust/fury-core/src/row/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f06a7ed

Please sign in to comment.