From 500f3a79cdd0ace777ceb54a2d1135b4649fa7b5 Mon Sep 17 00:00:00 2001 From: eblocha Date: Sat, 25 Jan 2025 22:11:19 -0500 Subject: [PATCH] Remove unnecessary generics from encode and decode functions for record batches --- src/records.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/records.rs b/src/records.rs index 6b3645e..1632a1a 100644 --- a/src/records.rs +++ b/src/records.rs @@ -158,16 +158,11 @@ const MAGIC_BYTE_OFFSET: usize = 16; impl RecordBatchEncoder { /// Encode records into given buffer, using provided encoding options that select the encoding /// strategy based on version. - pub fn encode<'a, B, I, CF>( - buf: &mut B, - records: I, - options: &RecordEncodeOptions, - ) -> Result<()> + pub fn encode<'a, B, I>(buf: &mut B, records: I, options: &RecordEncodeOptions) -> Result<()> where B: ByteBufMut, I: IntoIterator, I::IntoIter: Clone, - CF: Fn(&mut BytesMut, &mut B, Compression) -> Result<()>, { Self::encode_with_custom_compression( buf, @@ -507,10 +502,7 @@ impl RecordBatchEncoder { impl RecordBatchDecoder { /// Decode the provided buffer into a vec of records. - pub fn decode(buf: &mut B) -> Result> - where - F: Fn(&mut bytes::Bytes, Compression) -> Result, - { + pub fn decode(buf: &mut B) -> Result> { Self::decode_with_custom_compression( buf, None:: Result>,