Skip to content

Commit

Permalink
Simplify read_serial with .map(Serial::from)
Browse files Browse the repository at this point in the history
  • Loading branch information
shanicky committed Mar 6, 2023
1 parent 06dd1db commit 1cfefd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/src/array/column_proto_readers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ fn read_naive_date_time(cursor: &mut Cursor<&[u8]>) -> ArrayResult<NaiveDateTime
fn read_serial(cursor: &mut Cursor<&[u8]>) -> ArrayResult<Serial> {
I64ValueReader::read(cursor)
.map_err(|e| anyhow!("Failed to read i64 from Serial buffer: {}", e))
.map(|t| Serial::from(t))
.map(Serial::from)
.map_err(Into::into)
}

Expand Down

0 comments on commit 1cfefd6

Please sign in to comment.