From 7477436aa31c4d136d1fb565e6273faec64e7ec7 Mon Sep 17 00:00:00 2001 From: Andreas Grois Date: Tue, 11 Oct 2022 23:38:05 +0200 Subject: Fix Rust 1.52 compat. --- src/passwordmaker/base_conversion/mod.rs | 5 ++--- 1 file 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>; } -impl BaseConversion for T where T : ToI32Array{ +impl BaseConversion for T where T : ToI32Array{ fn convert_to_base(self, base : usize) -> std::iter::Rev> { self.to_int_array().calc_remainders(base).collect::>().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; } -- cgit v1.2.3