<commit_before>fn split_num(s: &str) -> Vec<i32> {
    let a = s.chars();
    let result = a.map(|x| x.to_string().parse::<i32>().unwrap())
        .collect::<Vec<i32>>();
    result
}

fn main() {
    let mut a = "123";
    let b = split_num(a);

    println!("{:?}", b);

    for c in a.chars() {
        println!("{:?}", c.to_string().parse::<i32>().unwrap());
    }
}<commit_msg>finish rust version<commit_after>fn split_num(s: &str) -> Vec<i32> {
    let a = s.chars();
    let result = a.map(|x| x.to_string().parse::<i32>().unwrap())
        .collect::<Vec<i32>>();
    result
}

fn is_happy(s: &str) -> bool {
    let num_vec: i32 = split_num(s).iter().sum();
    if num_vec < 1 {
        return false;
    }
    if num_vec == 1 {
        return true;
    }

    return is_happy(&num_vec.to_string());
}

fn main() {
    println!("{}", is_happy("19"));
    println!("{}", is_happy("1"));
}
{'fraction_non_alphanumeric': 0.23522853957636566, 'fraction_numerical': 0.026755852842809364, 'mean_word_length': 2.7107438016528924, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6028817', 'n_tokens_mistral': 368, 'n_tokens_neox': 354, 'n_words': 71}