add explicit .iter() for arrays so we still work with Rust 1.51

This commit is contained in:
bunnie 2021-07-18 16:04:22 +08:00
parent 01d3455a16
commit 825322c730

View file

@ -21,10 +21,10 @@ where
let mut source_file = std::fs::File::open(input)?;
let mut dest_file = std::fs::File::create(output)?;
source_file.read_to_end(&mut source)?;
for b in LOADER_VERSION.to_le_bytes() {
for &b in LOADER_VERSION.to_le_bytes().iter() {
source.push(b);
}
for b in (source.len() as u32).to_le_bytes() {
for &b in (source.len() as u32).to_le_bytes().iter() {
source.push(b);
}