You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: lib.rs
    path of file: ./repos/rust99/working-with-vectors/P27/src
    
    the code of the file until where you have to start completion: #![feature(vec_remove_item)]

use P26::combinations;

pub fn group3<T: Copy + PartialEq>(li: &[T]) -
    
pub fn group3<T: Copy + PartialEq>(li: &[T]) -> Vec<Vec<Vec<T>>> {
    let mut all_groups = vec![];
    let combs1 = combinations(2, li);
    for comb1 in combs1 {
        let li_sub = subtract(&li, &comb1);
        let combs2 = combinations(3, &li_sub);
        for comb2 in combs2 {
            let comb3 = subtract(&li_sub, &comb2);
            let mut group = vec![];
            group.push(comb1.clone());
            group.push(comb2);
            group.push(comb3);
            all_groups.push(group);
        }
    }
    all_groups
}