From d9a7c7b02ca1770c6f48f33d9cb32ff1bd2708ac Mon Sep 17 00:00:00 2001 From: zhiqiangxu <652732310@qq.com> Date: Thu, 7 Dec 2023 18:09:07 +0800 Subject: [PATCH] record.iter().count() => record.len() --- crates/subspace-farmer-components/src/plotting.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/subspace-farmer-components/src/plotting.rs b/crates/subspace-farmer-components/src/plotting.rs index 874158daf6..e5a646f2c6 100644 --- a/crates/subspace-farmer-components/src/plotting.rs +++ b/crates/subspace-farmer-components/src/plotting.rs @@ -514,7 +514,7 @@ where // happen at most as many times as there is number of chunks in the record, // otherwise `n+1` iterations could happen and update extra `encoded_chunk_used` // unnecessarily causing issues down the line - .take(record.iter().count()) + .take(record.len()) .zip(record.iter_mut()) // Write encoded chunk back so we can reuse original allocation .map(|(input_chunk, output_chunk)| {