@@ -236,10 +236,8 @@ fn parse_foreign_mod(
236236 for foreign in & foreign_mod. items {
237237 match foreign {
238238 ForeignItem :: Type ( foreign) => {
239- match parse_extern_type ( cx, foreign, lang, trusted, & namespace) {
240- Ok ( ety) => items. push ( ety) ,
241- Err ( err) => cx. push ( err) ,
242- }
239+ let ety = parse_extern_type ( cx, foreign, lang, trusted, & namespace) ;
240+ items. push ( ety) ;
243241 }
244242 ForeignItem :: Fn ( foreign) => {
245243 match parse_extern_fn ( cx, foreign, lang, trusted, & namespace) {
@@ -322,7 +320,7 @@ fn parse_extern_type(
322320 lang : Lang ,
323321 trusted : bool ,
324322 namespace : & Namespace ,
325- ) -> Result < Api > {
323+ ) -> Api {
326324 let mut doc = Doc :: new ( ) ;
327325 let mut namespace = namespace. clone ( ) ;
328326 attrs:: parse (
@@ -341,13 +339,13 @@ fn parse_extern_type(
341339 Lang :: Cxx => Api :: CxxType ,
342340 Lang :: Rust => Api :: RustType ,
343341 } ;
344- Ok ( api_type ( ExternType {
342+ api_type ( ExternType {
345343 doc,
346344 type_token,
347345 name : Pair :: new ( namespace, ident) ,
348346 semi_token,
349347 trusted,
350- } ) )
348+ } )
351349}
352350
353351fn parse_extern_fn (
0 commit comments