/// Prints out the quantity of bottles needed to store a given volume
///
/// # Arguments
/// * 'volume' - A volume to bottle in milliliters
///
Prints out the quantity of bottles needed to store a given volume
Prints out the quantity of bottles needed to store a given volume
pub fn calculate_num_bottles(volume: f64) -> Vec<(String, i32)> {
    let bottle_types = bottles();
    let mut bottle_counter: Vec<(String, i32)> = Vec::with_capacity(bottle_types.len());
    for bottle in bottle_types {
        let num_bottles: i32 = ((volume) / bottle.1).ceil() as i32;
        bottle_counter.push((bottle.0, num_bottles));
    }
    bottle_counter
}
pub fn calculate_num_bottles ( volume : f64 ) -> Vec < ( String , i32 ) > { let bottle_types = bottles ( ) ; let mut bottle_counter : Vec < ( String , i32 ) > = Vec :: with_capacity ( bottle_types . len ( ) ) ; for bottle in bottle_types { let num_bottles : i32 = ( ( volume ) / bottle . 1 ) . ceil ( ) as i32 ; bottle_counter . push ( ( bottle . 0 , num_bottles ) ) ; } bottle_counter }
Prints out the quantity of bottles needed to store a given volume
Prints out the quantity of bottles needed to store a given volume
volume
f64