@@ -385,7 +385,7 @@ impl Builder {
385385 output_vector. push ( prefix. clone ( ) ) ;
386386 }
387387
388- if let Some ( ref prefix) = self . options . anon_fields_prefix {
388+ if let prefix = & self . options . anon_fields_prefix {
389389 output_vector. push ( "--anon-fields-prefix" . into ( ) ) ;
390390 output_vector. push ( prefix. clone ( ) ) ;
391391 }
@@ -1217,9 +1217,9 @@ impl Builder {
12171217 self
12181218 }
12191219
1220- /// Use the given prefix for the anon fields instead of `__bindgen_anon_` .
1220+ /// Use the given prefix for the anon fields.
12211221 pub fn anon_fields_prefix < T : Into < String > > ( mut self , prefix : T ) -> Builder {
1222- self . options . anon_fields_prefix = Some ( prefix. into ( ) ) ;
1222+ self . options . anon_fields_prefix = prefix. into ( ) ;
12231223 self
12241224 }
12251225
@@ -1601,8 +1601,8 @@ struct BindgenOptions {
16011601 /// An optional prefix for the "raw" types, like `c_int`, `c_void`...
16021602 ctypes_prefix : Option < String > ,
16031603
1604- /// An optional prefix for the anon fields instead of `__bindgen_anon_` .
1605- anon_fields_prefix : Option < String > ,
1604+ /// The prefix for the anon fields.
1605+ anon_fields_prefix : String ,
16061606
16071607 /// Whether to time the bindgen phases.
16081608 time_phases : bool ,
@@ -1823,7 +1823,7 @@ impl Default for BindgenOptions {
18231823 disable_header_comment : false ,
18241824 use_core : false ,
18251825 ctypes_prefix : None ,
1826- anon_fields_prefix : None ,
1826+ anon_fields_prefix : "__bindgen_anon_" . into ( ) ,
18271827 namespaced_constants : true ,
18281828 msvc_mangling : false ,
18291829 convert_floats : true ,
0 commit comments