fn draw_version(&mut self) {
        if self.version.value() < 7 {
            return;
        }

        // Calculate error correction code and pack bits
        let bits: u32 = {
            let data = u32::from(self.version.value()); // uint6, in the range [7, 40]
            let mut rem: u32 = data;
            for _ in 0..12 {
                rem = (rem << 1) ^ ((rem >> 11) * 0x1F25);
            }
            data << 12 | rem // uint18
        };
        debug_assert_eq!(bits >> 18, 0);

        // Draw two copies
        for i in 0..18 {
            let bit: bool = get_bit(bits, i);
            let a: i32 = self.size - 11 + i % 3;
            let b: i32 = i / 3;
            self.set_function_module(a, b, bit);
            self.set_function_module(b, a, bit);
        }
    }
// Draws two copies of the version bits (with its own error correction code),
// based on this object's version field, iff 7 <= version <= 40.
Draws two copies of the version bits (with its own error correction code),
based on this object's version field, iff 7 <= version <= 40.
Draws two copies of the version bits ( with its own error correction code ) based on this object ' s version field iff 7 < = version < = 40 .
fn draw_version(&mut self) {
        if self.version.value() < 7 {
            return;
        }
        // Calculate error correction code and pack bits
        let bits: u32 = {
            let data = u32::from(self.version.value()); // uint6, in the range [7, 40]
            let mut rem: u32 = data;
            for _ in 0..12 {
                rem = (rem << 1) ^ ((rem >> 11) * 0x1F25);
            }
            data << 12 | rem // uint18
        };
        debug_assert_eq!(bits >> 18, 0);
        // Draw two copies
        for i in 0..18 {
            let bit: bool = get_bit(bits, i);
            let a: i32 = self.size - 11 + i % 3;
            let b: i32 = i / 3;
            self.set_function_module(a, b, bit);
            self.set_function_module(b, a, bit);
        }
    }
fn draw_version ( & mut self ) { if self . version . value ( ) < 7 { return ; } // Calculate error correction code and pack bits let bits : u32 = { let data = u32 :: from ( self . version . value ( ) ) ; // uint6, in the range [7, 40] let mut rem : u32 = data ; for _ in 0 .. 12 { rem = ( rem << 1 ) ^ ( ( rem >> 11 ) * 0x1F25 ) ; } data << 12 | rem // uint18 } ; debug_assert_eq ! ( bits 18 0 ) ; // Draw two copies for i in 0 .. 18 { let bit : bool = get_bit ( bits , i ) ; let a : i32 = self . size - 11 + i % 3 ; let b : i32 = i / 3 ; self . set_function_module ( a , b , bit ) ; self . set_function_module ( b , a , bit ) ; } }
Draws two copies of the version bits (with its own error correction code),
based on this object's version field, iff 7 <= version <= 40.
Draws two copies of the version bits ( with its own error correction code ) based on this object ' s version field iff 7 < = version < = 40 .
&mut self