From f659c37d29665a4a69d847723e7e1dfd256e3541 Mon Sep 17 00:00:00 2001 From: zzmp Date: Thu, 19 Jun 2014 12:56:55 -0700 Subject: Squelch warnings This squelches warnings from dead_code for many idiomatic structs. This squelches warnings for non_camel_case_functions for idiomatically named fns. --- crypto/hash.rs | 2 ++ crypto/hmac.rs | 2 ++ 2 files changed, 4 insertions(+) (limited to 'crypto') diff --git a/crypto/hash.rs b/crypto/hash.rs index 5cc0ec58..d03b0317 100644 --- a/crypto/hash.rs +++ b/crypto/hash.rs @@ -11,6 +11,7 @@ pub enum HashType { SHA512 } +#[allow(dead_code)] #[allow(non_camel_case_types)] pub struct EVP_MD_CTX { digest: *EVP_MD, @@ -57,6 +58,7 @@ pub fn evpmd(t: HashType) -> (*EVP_MD, uint) { } } +#[allow(dead_code)] pub struct Hasher { evp: *EVP_MD, ctx: *EVP_MD_CTX, diff --git a/crypto/hmac.rs b/crypto/hmac.rs index 93ae0158..1104f6c1 100644 --- a/crypto/hmac.rs +++ b/crypto/hmac.rs @@ -17,6 +17,7 @@ use libc::{c_uchar, c_int, c_uint}; use crypto::hash; +#[allow(dead_code)] #[allow(non_camel_case_types)] pub struct HMAC_CTX { md: *hash::EVP_MD, @@ -43,6 +44,7 @@ pub struct HMAC { len: uint, } +#[allow(non_snake_case_functions)] pub fn HMAC(ht: hash::HashType, key: &[u8]) -> HMAC { unsafe { let (evp, mdlen) = hash::evpmd(ht); -- cgit v1.2.3