no warning about the unused constants

This commit is contained in:
Y. T. Chung
2014-10-27 23:03:05 +08:00
parent 18088f41f0
commit dde336138b
5 changed files with 7 additions and 9 deletions
+3 -1
View File
@@ -27,7 +27,6 @@ cipher-cast5-cfb = []
cipher-des-cfb = []
cipher-idea-cfb = []
cipher-rc2-cfb = []
cipher-rc4-hmac-md5 = []
cipher-seed-cfb = []
[[bin]]
@@ -39,3 +38,6 @@ path = "src/bin/local.rs"
name = "ssserver"
path = "src/bin/server.rs"
[dependencies.rust-crypto]
git = "https://github.com/DaGenix/rust-crypto.git"
-4
View File
@@ -88,8 +88,6 @@ pub const CIPHER_DES_CFB: &'static str = "des-cfb";
pub const CIPHER_IDEA_CFB: &'static str = "idea-cfb";
#[cfg(feature="cipher-rc2-cfb")]
pub const CIPHER_RC2_CFB: &'static str = "rc2-cfb";
#[cfg(feature="cipher-rc4-hmac-md5")]
pub const CIPHER_RC4_HMAC_MD5: &'static str = "rc4-md5";
#[cfg(feature="cipher-seed-cfb")]
pub const CIPHER_SEED_CFB: &'static str = "seed-cfb";
@@ -236,8 +234,6 @@ pub fn with_name(method: &str, key: &[u8]) -> Option<CipherVariant> {
CIPHER_IDEA_CFB => Some(OpenSSLCrypto(openssl::OpenSSLCipher::new(CipherTypeIdeaCfb, key))),
#[cfg(feature="cipher-rc2-cfb")]
CIPHER_RC2_CFB => Some(OpenSSLCrypto(openssl::OpenSSLCipher::new(CipherTypeRc2Cfb, key))),
#[cfg(feature="cipher-rc4-hmac-md5")]
CIPHER_RC4_HMAC_MD5 => Some(OpenSSLCrypto(openssl::OpenSSLCipher::new(CipherTypeRc4HmacMd5, key))),
#[cfg(feature="cipher-seed-cfb")]
CIPHER_SEED_CFB => Some(OpenSSLCrypto(openssl::OpenSSLCipher::new(CipherTypeSeedCfb, key))),
+2
View File
@@ -23,6 +23,8 @@
extern crate libc;
extern crate test;
extern crate "rust-crypto" as rust_crypto;
pub mod cipher;
pub mod openssl;
pub mod rust;
-4
View File
@@ -116,8 +116,6 @@ extern {
fn EVP_idea_cfb64() -> EVP_CIPHER;
#[cfg(feature="cipher-rc2-cfb")]
fn EVP_rc2_cfb64() -> EVP_CIPHER;
#[cfg(feature="cipher-rc4-hmac-md5")]
fn EVP_rc4_hmac_md5() -> EVP_CIPHER;
#[cfg(feature="cipher-seed-cfb")]
fn EVP_seed_cfb128() -> EVP_CIPHER;
@@ -253,8 +251,6 @@ impl OpenSSLCrypto {
cipher::CipherTypeIdeaCfb => { (EVP_idea_cfb64(), 16, 8) },
#[cfg(feature="cipher-rc2-cfb")]
cipher::CipherTypeRc2Cfb => { (EVP_rc2_cfb64(), 16, 8) },
#[cfg(feature="cipher-rc4-hmac-md5")]
cipher::CipherTypeRc4HmacMd5 => { (EVP_rc4_hmac_md5(), 16, 0) },
#[cfg(feature="cipher-seed-cfb")]
cipher::CipherTypeSeedCfb => { (EVP_seed_cfb128(), 16, 16) },
+2
View File
@@ -19,6 +19,8 @@
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#![allow(dead_code)]
use std::fmt::{Show, Formatter, FormatError};
use std::io::net::ip::{SocketAddr, Port};
use std::io::net::ip::{Ipv4Addr, Ipv6Addr};