lower rust versions really don't like this

This commit is contained in:
lumi 2017-03-25 23:25:28 +01:00
parent da6ec998c9
commit d20e6d4b2b

View file

@ -3,8 +3,8 @@ use secret::SecretKind;
#[macro_export] #[macro_export]
macro_rules! impl_validator_using_provider { macro_rules! impl_validator_using_provider {
( $type:ty, $secret:ty ) => { ( $validator:ty, $secret:ty ) => {
impl $crate::server::Validator<$secret> for $type { impl $crate::server::Validator<$secret> for $validator {
fn validate(&self, identity: &$crate::common::Identity fn validate(&self, identity: &$crate::common::Identity
, value: &<$secret as sasl::secret::SecretKind>::Value) -> Result<(), String> { , value: &<$secret as sasl::secret::SecretKind>::Value) -> Result<(), String> {
if &(self as &$crate::server::Provider<$secret>).provide(identity)? == value { if &(self as &$crate::server::Provider<$secret>).provide(identity)? == value {