fn buy_groceries(mut shopping_list: Vec<&str>) -> Option<Vec<&str>>{

    println!("Going out to buy: {:?}", shopping_list);
    shopping_list.remove(0);

    println!("Couldn't find: {:?}", shopping_list);

    Some(shopping_list)
}
// returns groceries that you couldn't find, if any
returns groceries that you couldn't find, if any
returns groceries that you couldn ' t find if any
fn buy_groceries(mut shopping_list: Vec<&str>) -> Option<Vec<&str>>{
    println!("Going out to buy: {:?}", shopping_list);
    shopping_list.remove(0);
    println!("Couldn't find: {:?}", shopping_list);
    Some(shopping_list)
}
fn buy_groceries ( mut shopping_list : Vec < & str > ) -> Option < Vec < & str > > { println ! ( " " shopping_list ) ; shopping_list . remove ( 0 ) ; println ! ( " " shopping_list ) ; Some ( shopping_list ) }
returns groceries that you couldn't find, if any
returns groceries that you couldn ' t find if any
shopping_list
Vec<&str>