diff options
author | Andreas Grois <andi@grois.info> | 2022-10-11 23:38:05 +0200 |
---|---|---|
committer | Andreas Grois <andi@grois.info> | 2022-10-11 23:40:23 +0200 |
commit | 7477436aa31c4d136d1fb565e6273faec64e7ec7 (patch) | |
tree | c2fb279263262506cb13a8c638a481c4e9f4b38f /src | |
parent | 3bfb55ece2f70fc9b1969a2ec9c55f7a00358b90 (diff) |
Fix Rust 1.52 compat.
Diffstat (limited to 'src')
-rw-r--r-- | src/passwordmaker/base_conversion/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/passwordmaker/base_conversion/mod.rs b/src/passwordmaker/base_conversion/mod.rs index 705917a..8d217ef 100644 --- a/src/passwordmaker/base_conversion/mod.rs +++ b/src/passwordmaker/base_conversion/mod.rs @@ -12,7 +12,7 @@ pub(super) trait BaseConversion { fn convert_to_base(self, base : usize) -> std::iter::Rev<std::vec::IntoIter<usize>>; } -impl<const N : usize, T> BaseConversion for T where T : ToI32Array<Output = [u32;N]>{ +impl<T, const N : usize> BaseConversion for T where T : ToI32Array<Output = [u32;N]>{ fn convert_to_base(self, base : usize) -> std::iter::Rev<std::vec::IntoIter<usize>> { self.to_int_array().calc_remainders(base).collect::<Vec<_>>().into_iter().rev() } @@ -27,8 +27,7 @@ impl BaseConversion for [u8;16]{ // Rust 1.52 only has a very limited support for const generics. This means, we'll have to live with this not-too-constrained solution... -// Well, it's private, so no big loss. -trait ToI32Array { +pub(super) trait ToI32Array { type Output; fn to_int_array(self) -> Self::Output; } |