File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1+ use anyhow:: bail;
12use log:: * ;
23use serde:: { Deserialize , Serialize } ;
34
@@ -42,7 +43,7 @@ impl MakeFieldArray {
4243 . any ( |i| matches ! ( i. bit_offset, BitOffset :: Cursed ( _) ) ) ;
4344
4445 if has_regular_bit_offset && has_cursed_bit_offset {
45- panic ! ( "arrayize: items cannot mix bit_offset type" )
46+ bail ! ( "arrayize: items {} cannot mix bit_offset type" , to )
4647 }
4748 }
4849
@@ -58,7 +59,7 @@ impl MakeFieldArray {
5859 calc_array ( items. iter ( ) . map ( |x| x. bit_offset . min_offset ( ) ) . collect ( ) ) ;
5960 if let Array :: Cursed ( _) = & array {
6061 if !self . allow_cursed {
61- panic ! ( "arrayize: items are not evenly spaced. Set `allow_cursed: true` to allow this." )
62+ bail ! ( "arrayize: items {} are not evenly spaced. Set `allow_cursed: true` to allow this." , to )
6263 }
6364 }
6465
Original file line number Diff line number Diff line change 1+ use anyhow:: bail;
12use log:: * ;
23use serde:: { Deserialize , Serialize } ;
34
@@ -41,7 +42,7 @@ impl MakeRegisterArray {
4142 let ( offset, array) = calc_array ( items. iter ( ) . map ( |x| x. byte_offset ) . collect ( ) ) ;
4243 if let Array :: Cursed ( _) = & array {
4344 if !self . allow_cursed {
44- panic ! ( "arrayize: items are not evenly spaced. Set `allow_cursed: true` to allow this." )
45+ bail ! ( "arrayize: items {} are not evenly spaced. Set `allow_cursed: true` to allow this." , to ) ;
4546 }
4647 }
4748
You can’t perform that action at this time.
0 commit comments