@@ -93,13 +93,15 @@ unsafe impl Sync for ParamsRef<'_> {}
93
93
impl < ' a > ParamsRef < ' a > {
94
94
/// Merges two `ParamsRef` objects into a new `Params` object.
95
95
#[ corresponds( OSSL_PARAM_merge ) ]
96
+ #[ allow( dead_code) ]
96
97
pub fn merge ( & self , other : & ParamsRef < ' a > ) -> Result < Params < ' a > , ErrorStack > {
97
98
cvt_p ( unsafe { ffi:: OSSL_PARAM_merge ( self . as_ptr ( ) , other. as_ptr ( ) ) } )
98
99
. map ( |p| unsafe { Params :: from_ptr ( p) } )
99
100
}
100
101
101
102
/// Locate a parameter by the given key.
102
103
#[ corresponds( OSSL_PARAM_locate_const ) ]
104
+ #[ allow( dead_code) ]
103
105
fn locate ( & self , key : & CStr ) -> Option < * const ffi:: OSSL_PARAM > {
104
106
let param = unsafe { ffi:: OSSL_PARAM_locate_const ( self . as_ptr ( ) , key. as_ptr ( ) ) } ;
105
107
if param. is_null ( ) {
@@ -125,19 +127,22 @@ unsafe impl Sync for ParamBuilder<'_> {}
125
127
impl < ' a , ' b > ParamBuilder < ' a > {
126
128
/// Creates a new `ParamBuilder`.
127
129
#[ corresponds[ OSSL_PARAM_BLD_new ] ]
130
+ #[ allow( dead_code) ]
128
131
pub fn new ( ) -> Self {
129
132
unsafe { ParamBuilder ( ffi:: OSSL_PARAM_BLD_new ( ) , PhantomData ) }
130
133
}
131
134
132
135
/// Push a BigNum parameter into the builder.
133
136
#[ corresponds[ OSSL_PARAM_BLD_push_BN ] ]
137
+ #[ allow( dead_code) ]
134
138
pub fn push_bignum ( self , key : & ' b CStr , bn : & ' a BigNumRef ) -> Result < Self , ErrorStack > {
135
139
cvt ( unsafe { ffi:: OSSL_PARAM_BLD_push_BN ( self . 0 , key. as_ptr ( ) , bn. as_ptr ( ) ) } ) ?;
136
140
Ok ( self )
137
141
}
138
142
139
143
/// Push a UTF-8 String parameter into the builder.
140
144
#[ corresponds[ OSSL_PARAM_BLD_push_utf8_string ] ]
145
+ #[ allow( dead_code) ]
141
146
pub fn push_utf_string ( self , key : & ' b CStr , string : & ' a str ) -> Result < Self , ErrorStack > {
142
147
let value = string. as_bytes ( ) ;
143
148
cvt ( unsafe {
@@ -184,6 +189,7 @@ impl<'a, 'b> ParamBuilder<'a> {
184
189
185
190
/// Build a `Params` array from the builder consuming the builder.
186
191
#[ corresponds( OSSL_PARAM_BLD_to_param ) ]
192
+ #[ allow( dead_code) ]
187
193
pub fn build ( self ) -> Result < Params < ' b > , ErrorStack > {
188
194
let ptr = cvt_p ( unsafe { ffi:: OSSL_PARAM_BLD_to_param ( self . 0 ) } ) ?;
189
195
Ok ( unsafe { Params :: from_ptr ( ptr) } )
0 commit comments