Updated for language changes to macros.

This commit is contained in:
Aaron Weiss 2014-12-19 10:45:19 -05:00
parent 88b753d3fe
commit a637f2b0bf
3 changed files with 6 additions and 6 deletions

View File

@ -26,7 +26,7 @@ macro_rules! with_ctx(
r r
} }
}); });
) );
macro_rules! with_bn( macro_rules! with_bn(
($name:ident, $action:block) => ({ ($name:ident, $action:block) => ({
@ -42,7 +42,7 @@ macro_rules! with_bn(
Err(err) => Err(err), Err(err) => Err(err),
} }
}); });
) );
macro_rules! with_bn_in_ctx( macro_rules! with_bn_in_ctx(
($name:ident, $ctx_name:ident, $action:block) => ({ ($name:ident, $ctx_name:ident, $action:block) => ({
@ -66,7 +66,7 @@ macro_rules! with_bn_in_ctx(
Err(err) => Err(err), Err(err) => Err(err),
} }
}); });
) );
impl BigNum { impl BigNum {
pub fn new() -> Result<BigNum, SslError> { pub fn new() -> Result<BigNum, SslError> {

View File

@ -55,7 +55,7 @@ impl HMAC {
let mut res = Vec::from_elem(self.len, 0u8); let mut res = Vec::from_elem(self.len, 0u8);
let mut outlen = 0; let mut outlen = 0;
ffi::HMAC_Final(&mut self.ctx, res.as_mut_ptr(), &mut outlen); ffi::HMAC_Final(&mut self.ctx, res.as_mut_ptr(), &mut outlen);
assert!(self.len == outlen as uint) assert!(self.len == outlen as uint);
res res
} }
} }

View File

@ -449,7 +449,7 @@ macro_rules! make_validation_error(
} }
} }
) )
) );
make_validation_error!(X509_V_OK, make_validation_error!(X509_V_OK,
X509UnableToGetIssuerCert = X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT, X509UnableToGetIssuerCert = X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT,
@ -505,7 +505,7 @@ make_validation_error!(X509_V_OK,
X509UnsupportedNameSyntax = X509_V_ERR_UNSUPPORTED_NAME_SYNTAX, X509UnsupportedNameSyntax = X509_V_ERR_UNSUPPORTED_NAME_SYNTAX,
X509CrlPathValidationError= X509_V_ERR_CRL_PATH_VALIDATION_ERROR, X509CrlPathValidationError= X509_V_ERR_CRL_PATH_VALIDATION_ERROR,
X509ApplicationVerification = X509_V_ERR_APPLICATION_VERIFICATION, X509ApplicationVerification = X509_V_ERR_APPLICATION_VERIFICATION,
) );
#[test] #[test]