From d89f4bcea9407c5560392c875db2a1415bbc81be Mon Sep 17 00:00:00 2001 From: Matt Bilker Date: Tue, 28 Dec 2021 08:14:05 +0000 Subject: [PATCH] lib: support Rust 1.48 as MSRV --- src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 98ea921..250625c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -486,7 +486,10 @@ fn apply_profile_override( ); // Zero out the field first. - config.$field.fill(0); + // (`fill` was stabilized in Rust 1.50, but Debian Bullseye ships with 1.48) + for v in config.$field.iter_mut() { + *v = 0; + } // Write the string bytes. let _ = config.$field[..].as_mut().write_all(value_bytes);