lib: support Rust 1.48 as MSRV

This commit is contained in:
Matt Bilker 2021-12-28 08:14:05 +00:00
parent 6541af70bb
commit d89f4bcea9
No known key found for this signature in database
GPG Key ID: 69ADF8AEB6C8B5D1

View File

@ -486,7 +486,10 @@ fn apply_profile_override(
); );
// Zero out the field first. // 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. // Write the string bytes.
let _ = config.$field[..].as_mut().write_all(value_bytes); let _ = config.$field[..].as_mut().write_all(value_bytes);