Skip to content

Commit e0e2528

Browse files
committed
use zero as fill value if the entire chunk is patches
1 parent f4ef3cc commit e0e2528

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

encodings/alp/src/alp/mod.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,11 @@ pub trait ALPFloat: private::Sealed + Float + Display + 'static {
164164
.collect();
165165

166166
if !patch_indices.is_empty() {
167-
if let Some(fill_value) =
168-
Self::first_non_patched_encoded_value(&encoded, &patch_indices)
169-
{
170-
for index in patch_indices.iter() {
171-
let index = *index as usize;
172-
encoded[index] = fill_value;
173-
}
167+
let fill_value =
168+
Self::first_non_patched_encoded_value(&encoded, &patch_indices).unwrap_or_default();
169+
for index in patch_indices.iter() {
170+
let index = *index as usize;
171+
encoded[index] = fill_value;
174172
}
175173
}
176174

0 commit comments

Comments
 (0)