News for hackers. Stuff that matters.
Re:Writing a JPEG Decoder in Rust – Part 2: Implementation I by eddyb on Friday August 19, 2016 @06:04PM (#12323846)
The example can be written like this though:

  let codes: Vec<HuffmanCode> = data_table.iter()
            .zip(&code_lengths)
            .zip(&code_table)
            .map(|((&value, &length), &code)| {
                HuffmanCode {
                    length: length,
                    code: code,
                    value: value,
                }
            })
            .collect();
Re:Writing a JPEG Decoder in Rust – Part 2: Implementation I by Veedrac on Saturday August 20, 2016 @01:20AM (#12325337)
In fact `code_lengths` and `code_table` are never used again so should just be passed by value, which saves four more `&`s.