<commit_before>use std::cmp;
use std::io::prelude::*;
use std::fs::File;
use std::path::Path;

fn main() {
    let mut f = File::open(Path::new("/Users/PetarV/rust-proj/advent-of-rust/target/input.txt"))
    	.ok()
    	.expect("Failed to open the input file!");

	let mut input = String::new();
	f.read_to_string(&mut input)
		.ok()
		.expect("Failed to read from the input file!");

    // We're reading the input line by line now, so create a buffered reader
    let ret = input.lines().fold(0, |acc, line| {
    	let sides: Vec<u32> = line.split('x').map(|len| { 
    			len.parse().ok().expect("Could not parse into an integer!")
    		}).collect();
<commit_msg>day 3 solved.<commit_after>use std::cmp;
use std::io::prelude::*;
use std::fs::File;
use std::path::Path;

fn main() {
    let mut f = File::open(Path::new("/Users/PetarV/rust-proj/advent-of-rust/target/input.txt"))
    	.ok()
    	.expect("Failed to open the input file!");

	let mut input = String::new();
	f.read_to_string(&mut input)
		.ok()
		.expect("Failed to read from the input file!");

    let ret = input.lines().fold(0, |acc, line| {
    	let sides: Vec<u32> = line.split('x').map(|len| { 
    			len.parse().ok().expect("Could not parse into an integer!")
    		}).collect();

{'fraction_non_alphanumeric': 0.19649960222752585, 'fraction_numerical': 0.005568814638027049, 'mean_word_length': 3.5251798561151078, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2175650', 'n_tokens_mistral': 466, 'n_tokens_neox': 446, 'n_words': 117}