From 11c44d3b88d3dfb5bcc220575c2e662cbac1983f Mon Sep 17 00:00:00 2001 From: Eunchong Yu Date: Wed, 27 Aug 2014 15:40:09 +0900 Subject: [PATCH] Fix the ambiguous integer literal error This commit fixes this: > src/crypto/symm.rs:95:25: 95:52 error: cannot determine a type for > this expression: cannot determine the type of this integer; add a > suffix to specify the type explicitly [E0101] > src/crypto/symm.rs:95 let v = if padding { 1 } else { 0 } as c_int; --- src/crypto/symm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/symm.rs b/src/crypto/symm.rs index 8d8f651c..93286498 100644 --- a/src/crypto/symm.rs +++ b/src/crypto/symm.rs @@ -92,7 +92,7 @@ impl Crypter { pub fn pad(&self, padding: bool) { if self.blocksize > 0 { unsafe { - let v = if padding { 1 } else { 0 } as c_int; + let v = if padding { 1 as c_int } else { 0 }; EVP_CIPHER_CTX_set_padding(self.ctx, v); } }