More work on governance.

This commit is contained in:
Gav committed 2018-02-28 21:01:35 +01:00
1 parent 93ac92dfb2
commit aa675add28
2 files changed
+66 -28

No files matched your search

+10
View File
@@ -112,6 +112,16 @@ impl Slicable for Vec<u8> {
}
}
impl Slicable for Vec<bool> {
fn decode<I: Input>(input: &mut I) -> Option<Self> {
<Vec<u8>>::decode(input).map(|a| a.into_iter().map(|b| b != 0).collect())
}
fn encode(&self) -> Vec<u8> {
<Vec<u8>>::encode(&self.iter().map(|&b| if b {1} else {0}).collect())
}
}
macro_rules! impl_vec_simple_array {
($($size:expr),*) => {
$(