Skip to content

Commit 5cf2c2d

Browse files
committed
Fix clippy
1 parent 94e70e0 commit 5cf2c2d

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

openssl/src/bn.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ impl BigNumRef {
188188
/// OpenSSL documentation at [`BN_div_word`]
189189
///
190190
/// [`BN_div_word`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_div_word.html
191-
#[allow(clippy::identity_conversion)]
191+
#[allow(clippy::useless_conversion)]
192192
pub fn div_word(&mut self, w: u32) -> Result<u64, ErrorStack> {
193193
unsafe {
194194
let r = ffi::BN_div_word(self.as_ptr(), w.into());
@@ -205,7 +205,7 @@ impl BigNumRef {
205205
/// OpenSSL documentation at [`BN_mod_word`]
206206
///
207207
/// [`BN_mod_word`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_mod_word.html
208-
#[allow(clippy::identity_conversion)]
208+
#[allow(clippy::useless_conversion)]
209209
pub fn mod_word(&self, w: u32) -> Result<u64, ErrorStack> {
210210
unsafe {
211211
let r = ffi::BN_mod_word(self.as_ptr(), w.into());
@@ -243,7 +243,7 @@ impl BigNumRef {
243243
/// OpenSSL documentation at [`BN_set_bit`]
244244
///
245245
/// [`BN_set_bit`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_set_bit.html
246-
#[allow(clippy::identity_conversion)]
246+
#[allow(clippy::useless_conversion)]
247247
pub fn set_bit(&mut self, n: i32) -> Result<(), ErrorStack> {
248248
unsafe { cvt(ffi::BN_set_bit(self.as_ptr(), n.into())).map(|_| ()) }
249249
}
@@ -255,7 +255,7 @@ impl BigNumRef {
255255
/// OpenSSL documentation at [`BN_clear_bit`]
256256
///
257257
/// [`BN_clear_bit`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_clear_bit.html
258-
#[allow(clippy::identity_conversion)]
258+
#[allow(clippy::useless_conversion)]
259259
pub fn clear_bit(&mut self, n: i32) -> Result<(), ErrorStack> {
260260
unsafe { cvt(ffi::BN_clear_bit(self.as_ptr(), n.into())).map(|_| ()) }
261261
}
@@ -265,7 +265,7 @@ impl BigNumRef {
265265
/// OpenSSL documentation at [`BN_is_bit_set`]
266266
///
267267
/// [`BN_is_bit_set`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_is_bit_set.html
268-
#[allow(clippy::identity_conversion)]
268+
#[allow(clippy::useless_conversion)]
269269
pub fn is_bit_set(&self, n: i32) -> bool {
270270
unsafe { ffi::BN_is_bit_set(self.as_ptr(), n.into()) == 1 }
271271
}
@@ -277,7 +277,7 @@ impl BigNumRef {
277277
/// OpenSSL documentation at [`BN_mask_bits`]
278278
///
279279
/// [`BN_mask_bits`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_mask_bits.html
280-
#[allow(clippy::identity_conversion)]
280+
#[allow(clippy::useless_conversion)]
281281
pub fn mask_bits(&mut self, n: i32) -> Result<(), ErrorStack> {
282282
unsafe { cvt(ffi::BN_mask_bits(self.as_ptr(), n.into())).map(|_| ()) }
283283
}
@@ -325,7 +325,7 @@ impl BigNumRef {
325325
/// OpenSSL documentation at [`BN_lshift`]
326326
///
327327
/// [`BN_lshift`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_lshift.html
328-
#[allow(clippy::identity_conversion)]
328+
#[allow(clippy::useless_conversion)]
329329
pub fn lshift(&mut self, a: &BigNumRef, n: i32) -> Result<(), ErrorStack> {
330330
unsafe { cvt(ffi::BN_lshift(self.as_ptr(), a.as_ptr(), n.into())).map(|_| ()) }
331331
}
@@ -335,7 +335,7 @@ impl BigNumRef {
335335
/// OpenSSL documentation at [`BN_rshift`]
336336
///
337337
/// [`BN_rshift`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_rshift.html
338-
#[allow(clippy::identity_conversion)]
338+
#[allow(clippy::useless_conversion)]
339339
pub fn rshift(&mut self, a: &BigNumRef, n: i32) -> Result<(), ErrorStack> {
340340
unsafe { cvt(ffi::BN_rshift(self.as_ptr(), a.as_ptr(), n.into())).map(|_| ()) }
341341
}
@@ -421,7 +421,7 @@ impl BigNumRef {
421421
///
422422
/// [`constants`]: index.html#constants
423423
/// [`BN_rand`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_rand.html
424-
#[allow(clippy::identity_conversion)]
424+
#[allow(clippy::useless_conversion)]
425425
pub fn rand(&mut self, bits: i32, msb: MsbOption, odd: bool) -> Result<(), ErrorStack> {
426426
unsafe {
427427
cvt(ffi::BN_rand(
@@ -439,7 +439,7 @@ impl BigNumRef {
439439
/// OpenSSL documentation at [`BN_psuedo_rand`]
440440
///
441441
/// [`BN_psuedo_rand`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_pseudo_rand.html
442-
#[allow(clippy::identity_conversion)]
442+
#[allow(clippy::useless_conversion)]
443443
pub fn pseudo_rand(&mut self, bits: i32, msb: MsbOption, odd: bool) -> Result<(), ErrorStack> {
444444
unsafe {
445445
cvt(ffi::BN_pseudo_rand(
@@ -818,7 +818,7 @@ impl BigNumRef {
818818
/// # Return Value
819819
///
820820
/// Returns `true` if `self` is prime with an error probability of less than `0.25 ^ checks`.
821-
#[allow(clippy::identity_conversion)]
821+
#[allow(clippy::useless_conversion)]
822822
pub fn is_prime(&self, checks: i32, ctx: &mut BigNumContextRef) -> Result<bool, ErrorStack> {
823823
unsafe {
824824
cvt_n(ffi::BN_is_prime_ex(
@@ -844,7 +844,7 @@ impl BigNumRef {
844844
/// # Return Value
845845
///
846846
/// Returns `true` if `self` is prime with an error probability of less than `0.25 ^ checks`.
847-
#[allow(clippy::identity_conversion)]
847+
#[allow(clippy::useless_conversion)]
848848
pub fn is_prime_fasttest(
849849
&self,
850850
checks: i32,

openssl/src/pkcs5.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub struct KeyIvPair {
2323
///
2424
/// New applications should not use this and instead use
2525
/// `pbkdf2_hmac` or another more modern key derivation algorithm.
26-
#[allow(clippy::identity_conversion)]
26+
#[allow(clippy::useless_conversion)]
2727
pub fn bytes_to_key(
2828
cipher: Cipher,
2929
digest: MessageDigest,

openssl/src/ssl/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,7 +1738,7 @@ impl SslContextBuilder {
17381738
/// This corresponds to [`SSL_CTX_sess_get_cache_size`].
17391739
///
17401740
/// [`SSL_CTX_sess_get_cache_size`]: https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_sess_set_cache_size.html
1741-
#[allow(clippy::identity_conversion)]
1741+
#[allow(clippy::useless_conversion)]
17421742
pub fn set_session_cache_size(&mut self, size: i32) -> i64 {
17431743
unsafe { ffi::SSL_CTX_sess_set_cache_size(self.as_ptr(), size.into()).into() }
17441744
}
@@ -1980,7 +1980,7 @@ impl SslContextRef {
19801980
/// This corresponds to [`SSL_CTX_sess_get_cache_size`].
19811981
///
19821982
/// [`SSL_CTX_sess_get_cache_size`]: https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_sess_set_cache_size.html
1983-
#[allow(clippy::identity_conversion)]
1983+
#[allow(clippy::useless_conversion)]
19841984
pub fn session_cache_size(&self) -> i64 {
19851985
unsafe { ffi::SSL_CTX_sess_get_cache_size(self.as_ptr()).into() }
19861986
}
@@ -2098,7 +2098,7 @@ impl SslCipherRef {
20982098
/// This corresponds to [`SSL_CIPHER_get_bits`].
20992099
///
21002100
/// [`SSL_CIPHER_get_bits`]: https://www.openssl.org/docs/manmaster/man3/SSL_CIPHER_get_name.html
2101-
#[allow(clippy::identity_conversion)]
2101+
#[allow(clippy::useless_conversion)]
21022102
pub fn bits(&self) -> CipherBits {
21032103
unsafe {
21042104
let mut algo_bits = 0;
@@ -2257,7 +2257,7 @@ impl SslSessionRef {
22572257
/// This corresponds to [`SSL_SESSION_get_time`].
22582258
///
22592259
/// [`SSL_SESSION_get_time`]: https://www.openssl.org/docs/man1.1.1/man3/SSL_SESSION_get_time.html
2260-
#[allow(clippy::identity_conversion)]
2260+
#[allow(clippy::useless_conversion)]
22612261
pub fn time(&self) -> i64 {
22622262
unsafe { ffi::SSL_SESSION_get_time(self.as_ptr()).into() }
22632263
}
@@ -2269,7 +2269,7 @@ impl SslSessionRef {
22692269
/// This corresponds to [`SSL_SESSION_get_timeout`].
22702270
///
22712271
/// [`SSL_SESSION_get_timeout`]: https://www.openssl.org/docs/man1.1.1/man3/SSL_SESSION_get_time.html
2272-
#[allow(clippy::identity_conversion)]
2272+
#[allow(clippy::useless_conversion)]
22732273
pub fn timeout(&self) -> i64 {
22742274
unsafe { ffi::SSL_SESSION_get_timeout(self.as_ptr()).into() }
22752275
}

0 commit comments

Comments
 (0)