@@ -368,7 +368,7 @@ pub struct BindgenContext {
368368 translation_unit : clang:: TranslationUnit ,
369369
370370 /// Target information that can be useful for some stuff.
371- target_info : Option < clang:: TargetInfo > ,
371+ target_info : clang:: TargetInfo ,
372372
373373 /// The options given by the user via cli or other medium.
374374 options : BindgenOptions ,
@@ -584,10 +584,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
584584
585585 /// Returns `true` if the target architecture is wasm32
586586 pub fn is_target_wasm32 ( & self ) -> bool {
587- match self . target_info {
588- Some ( ref ti) => ti. triple . starts_with ( "wasm32-" ) ,
589- None => false ,
590- }
587+ self . target_info . triple . starts_with ( "wasm32-" )
591588 }
592589
593590 /// Creates a timer for the current bindgen phase. If time_phases is `true`,
@@ -600,10 +597,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
600597 /// Returns the pointer width to use for the target for the current
601598 /// translation.
602599 pub fn target_pointer_size ( & self ) -> usize {
603- if let Some ( ref ti) = self . target_info {
604- return ti. pointer_width / 8 ;
605- }
606- mem:: size_of :: < * mut ( ) > ( )
600+ return self . target_info . pointer_width / 8 ;
607601 }
608602
609603 /// Get the stack of partially parsed types that we are in the middle of
0 commit comments