File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,6 @@ use crate::{
22
22
Shape , Uiua , UiuaResult ,
23
23
} ;
24
24
25
- #[ cfg( feature = "bytes" ) ]
26
- use super :: op_bytes_retry_fill;
27
25
use super :: { ArrayCmpSlice , FillContext } ;
28
26
29
27
impl Value {
@@ -162,18 +160,14 @@ impl Value {
162
160
Value :: Num ( a) => a. reshape ( & target_shape, env) ,
163
161
#[ cfg( feature = "bytes" ) ]
164
162
Value :: Byte ( a) => {
165
- * self = op_bytes_retry_fill (
166
- take ( a) ,
167
- |mut a| {
168
- a. reshape ( & target_shape, env) ?;
169
- Ok ( a. into ( ) )
170
- } ,
171
- |mut a| {
172
- a. reshape ( & target_shape, env) ?;
173
- Ok ( a. into ( ) )
174
- } ,
175
- ) ?;
176
- Ok ( ( ) )
163
+ if env. num_fill ( ) . is_ok ( ) && env. byte_fill ( ) . is_err ( ) {
164
+ let mut arr: Array < f64 > = a. convert_ref ( ) ;
165
+ arr. reshape ( & target_shape, env) ?;
166
+ * self = arr. into ( ) ;
167
+ Ok ( ( ) )
168
+ } else {
169
+ a. reshape ( & target_shape, env)
170
+ }
177
171
}
178
172
Value :: Complex ( a) => a. reshape ( & target_shape, env) ,
179
173
Value :: Char ( a) => a. reshape ( & target_shape, env) ,
You can’t perform that action at this time.
0 commit comments