File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ mod private {
3535}
3636
3737pub trait ALPFloat : private:: Sealed + Float + Display + ' static {
38- type ALPInt : PrimInt + Display + ToPrimitive + Copy ;
38+ type ALPInt : PrimInt + Display + ToPrimitive + Copy + Default ;
3939
4040 const FRACTIONAL_BITS : u8 ;
4141 const MAX_EXPONENT : u8 ;
@@ -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
You can’t perform that action at this time.
0 commit comments