Skip to content

Commit 4f57bbf

Browse files
committed
params: temporarily disable dead_code lint
1 parent cd8b1da commit 4f57bbf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

openssl/src/params.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,15 @@ unsafe impl Sync for ParamsRef<'_> {}
9393
impl<'a> ParamsRef<'a> {
9494
/// Merges two `ParamsRef` objects into a new `Params` object.
9595
#[corresponds(OSSL_PARAM_merge)]
96+
#[allow(dead_code)]
9697
pub fn merge(&self, other: &ParamsRef<'a>) -> Result<Params<'a>, ErrorStack> {
9798
cvt_p(unsafe { ffi::OSSL_PARAM_merge(self.as_ptr(), other.as_ptr()) })
9899
.map(|p| unsafe { Params::from_ptr(p) })
99100
}
100101

101102
/// Locate a parameter by the given key.
102103
#[corresponds(OSSL_PARAM_locate_const)]
104+
#[allow(dead_code)]
103105
fn locate(&self, key: &CStr) -> Option<*const ffi::OSSL_PARAM> {
104106
let param = unsafe { ffi::OSSL_PARAM_locate_const(self.as_ptr(), key.as_ptr()) };
105107
if param.is_null() {
@@ -125,19 +127,22 @@ unsafe impl Sync for ParamBuilder<'_> {}
125127
impl<'a, 'b> ParamBuilder<'a> {
126128
/// Creates a new `ParamBuilder`.
127129
#[corresponds[OSSL_PARAM_BLD_new]]
130+
#[allow(dead_code)]
128131
pub fn new() -> Self {
129132
unsafe { ParamBuilder(ffi::OSSL_PARAM_BLD_new(), PhantomData) }
130133
}
131134

132135
/// Push a BigNum parameter into the builder.
133136
#[corresponds[OSSL_PARAM_BLD_push_BN]]
137+
#[allow(dead_code)]
134138
pub fn push_bignum(self, key: &'b CStr, bn: &'a BigNumRef) -> Result<Self, ErrorStack> {
135139
cvt(unsafe { ffi::OSSL_PARAM_BLD_push_BN(self.0, key.as_ptr(), bn.as_ptr()) })?;
136140
Ok(self)
137141
}
138142

139143
/// Push a UTF-8 String parameter into the builder.
140144
#[corresponds[OSSL_PARAM_BLD_push_utf8_string]]
145+
#[allow(dead_code)]
141146
pub fn push_utf_string(self, key: &'b CStr, string: &'a str) -> Result<Self, ErrorStack> {
142147
let value = string.as_bytes();
143148
cvt(unsafe {
@@ -184,6 +189,7 @@ impl<'a, 'b> ParamBuilder<'a> {
184189

185190
/// Build a `Params` array from the builder consuming the builder.
186191
#[corresponds(OSSL_PARAM_BLD_to_param)]
192+
#[allow(dead_code)]
187193
pub fn build(self) -> Result<Params<'b>, ErrorStack> {
188194
let ptr = cvt_p(unsafe { ffi::OSSL_PARAM_BLD_to_param(self.0) })?;
189195
Ok(unsafe { Params::from_ptr(ptr) })

0 commit comments

Comments
 (0)