@@ -71,22 +71,18 @@ impl TestTemplate {
71
71
let mut const_tests = vec ! [ ] ;
72
72
let mut const_cstr_tests = vec ! [ ] ;
73
73
for constant in ffi_items. constants ( ) {
74
- if let syn:: Type :: Ptr ( ptr) = & constant. ty {
75
- let is_const_c_char_ptr = matches ! (
76
- & * ptr. elem,
77
- syn:: Type :: Path ( path)
78
- if path. path. segments. last( ) . unwrap( ) . ident == "c_char"
79
- && ptr. mutability. is_none( )
80
- ) ;
81
- if is_const_c_char_ptr {
82
- let item = TestCstr {
83
- test_ident : cstr_test_ident ( constant. ident ( ) ) ,
84
- rust_ident : constant. ident ( ) . into ( ) ,
85
- c_ident : helper. c_ident ( constant) . into ( ) ,
86
- c_type : helper. c_type ( constant) ?. into ( ) ,
87
- } ;
88
- const_cstr_tests. push ( item)
89
- }
74
+ if let syn:: Type :: Ptr ( ptr) = & constant. ty
75
+ && let syn:: Type :: Path ( path) = & * ptr. elem
76
+ && path. path . segments . last ( ) . unwrap ( ) . ident == "c_char"
77
+ && ptr. mutability . is_none ( )
78
+ {
79
+ let item = TestCstr {
80
+ test_ident : cstr_test_ident ( constant. ident ( ) ) ,
81
+ rust_ident : constant. ident ( ) . into ( ) ,
82
+ c_ident : helper. c_ident ( constant) . into ( ) ,
83
+ c_type : helper. c_type ( constant) ?. into ( ) ,
84
+ } ;
85
+ const_cstr_tests. push ( item)
90
86
} else {
91
87
let item = TestConst {
92
88
test_ident : const_test_ident ( constant. ident ( ) ) ,
0 commit comments