@@ -121,7 +121,7 @@ impl IntrinsicTypeDefinition for ArmIntrinsicType {
121121 }
122122 }
123123
124- fn from_c ( s : & str , target : & str ) -> Result < Box < Self > , String > {
124+ fn from_c ( s : & str , target : & str ) -> Result < Self , String > {
125125 const CONST_STR : & str = "const" ;
126126 if let Some ( s) = s. strip_suffix ( '*' ) {
127127 let ( s, constant) = match s. trim ( ) . strip_suffix ( CONST_STR ) {
@@ -131,9 +131,8 @@ impl IntrinsicTypeDefinition for ArmIntrinsicType {
131131 let s = s. trim_end ( ) ;
132132 let temp_return = ArmIntrinsicType :: from_c ( s, target) ;
133133 temp_return. map ( |mut op| {
134- let edited = op. as_mut ( ) ;
135- edited. 0 . ptr = true ;
136- edited. 0 . ptr_constant = constant;
134+ op. ptr = true ;
135+ op. ptr_constant = constant;
137136 op
138137 } )
139138 } else {
@@ -163,7 +162,7 @@ impl IntrinsicTypeDefinition for ArmIntrinsicType {
163162 ) ,
164163 None => None ,
165164 } ;
166- Ok ( Box :: new ( ArmIntrinsicType ( IntrinsicType {
165+ Ok ( ArmIntrinsicType ( IntrinsicType {
167166 ptr : false ,
168167 ptr_constant : false ,
169168 constant,
@@ -172,14 +171,14 @@ impl IntrinsicTypeDefinition for ArmIntrinsicType {
172171 simd_len,
173172 vec_len,
174173 target : target. to_string ( ) ,
175- } ) ) )
174+ } ) )
176175 } else {
177176 let kind = start. parse :: < TypeKind > ( ) ?;
178177 let bit_len = match kind {
179178 TypeKind :: Int ( _) => Some ( 32 ) ,
180179 _ => None ,
181180 } ;
182- Ok ( Box :: new ( ArmIntrinsicType ( IntrinsicType {
181+ Ok ( ArmIntrinsicType ( IntrinsicType {
183182 ptr : false ,
184183 ptr_constant : false ,
185184 constant,
@@ -188,7 +187,7 @@ impl IntrinsicTypeDefinition for ArmIntrinsicType {
188187 simd_len : None ,
189188 vec_len : None ,
190189 target : target. to_string ( ) ,
191- } ) ) )
190+ } ) )
192191 }
193192 }
194193 }
0 commit comments