tuple 0.5.2

Element-wise operations on tuples
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate std;

macro_rules! m_std {
    ($($Tuple:ident $Arr:ident { $($T:ident . $t:ident . $idx:tt),* } )*) => ($(
        impl<$($T,)*> Hash for $Tuple<$($T),*> where $( $T: Hash),* {
            #[inline(always)]
            fn hash<Ha>(&self, state: &mut Ha) where Ha: Hasher {
                $(
                    self.$idx.hash(state);
                )*
            }
        }
    )*)
}

use std::hash::{Hash, Hasher};
use super::*;
impl_tuple!(m_std);