File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -381,7 +381,7 @@ fn parse_type_sig(iface: &InterfaceConfig, content: Option<&str>) -> Result<Vec<
381381 continue ;
382382 }
383383
384- let return_type = parts. last ( ) . unwrap ( ) . to_string ( ) ;
384+ let return_type = parts. last ( ) . expect ( "TODO: handle error" ) . to_string ( ) ;
385385 let params: Vec < Param > = parts[ ..parts. len ( ) - 1 ]
386386 . iter ( )
387387 . enumerate ( )
@@ -488,7 +488,7 @@ mod tests {
488488
489489 #[ test]
490490 fn parse_c_function_simple ( ) {
491- let contract = try_parse_c_function ( "int process_item(void* input, size_t len);" ) . unwrap ( ) ;
491+ let contract = try_parse_c_function ( "int process_item(void* input, size_t len);" ) . expect ( "TODO: handle error" ) ;
492492 assert_eq ! ( contract. name, "process_item" ) ;
493493 assert_eq ! ( contract. return_type, "Int" ) ;
494494 assert_eq ! ( contract. params. len( ) , 2 ) ;
@@ -504,7 +504,7 @@ mod tests {
504504 #[ test]
505505 fn parse_rpc_method ( ) {
506506 let contract =
507- try_parse_rpc ( "rpc GetUser (GetUserRequest) returns (UserResponse);" ) . unwrap ( ) ;
507+ try_parse_rpc ( "rpc GetUser (GetUserRequest) returns (UserResponse);" ) . expect ( "TODO: handle error" ) ;
508508 assert_eq ! ( contract. name, "GetUser" ) ;
509509 assert_eq ! ( contract. params[ 0 ] . type_name, "GetUserRequest" ) ;
510510 assert_eq ! ( contract. return_type, "UserResponse" ) ;
You can’t perform that action at this time.
0 commit comments