Skip to content

Commit

Permalink
fix: do not decode twice on lookback
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanBorai committed Jul 25, 2023
1 parent 07f3450 commit 1990028
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions crates/fluvio-smartmodule-derive/src/generator/look_back.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ pub fn generate_look_back_smartmodule(sm_func: &SmartModuleFn) -> TokenStream {
let base_offset = smartmodule_input.base_offset();
let records_input = smartmodule_input.into_raw_bytes();

if let Err(_err) = Decoder::decode(&mut records, &mut std::io::Cursor::new(records_input), version) {
return SmartModuleLookbackErrorStatus::DecodingRecords as i32;
};

// PROCESSING
for record in records.into_iter() {
let result = super:: #user_fn(&record);
Expand Down

0 comments on commit 1990028

Please sign in to comment.