Corrected use of bitwise or in place of exponent operation
This commit is contained in:
		@@ -77,12 +77,12 @@ impl Network {
 | 
			
		||||
        host_bits -= network_bits;
 | 
			
		||||
 | 
			
		||||
        //Determine Spacing
 | 
			
		||||
        let network_spacing = 2 ^ subnet_mask[most_sig_octet].count_ones() as u8;
 | 
			
		||||
        let network_spacing = u8::pow(2, subnet_mask[most_sig_octet].count_ones());
 | 
			
		||||
 | 
			
		||||
        //Determine number of networks in the subnet
 | 
			
		||||
        let mut num_networks: u8 = 0;
 | 
			
		||||
        for i in 1..network_bits {
 | 
			
		||||
            num_networks += 2^i;
 | 
			
		||||
            num_networks += u8::pow(2, u32::from(i));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        //Generate base address
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user