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

struct Vertex {
	x: f32,
	y: f32,
	z: f32
}

pub struct WavefrontModel {
	vertices: Vec<Vertex>
}

impl WavefrontModel {
	pub fn new(path: &'static str) {
		let mut file = match File::open(&path) {
			// The `description` method of `io::Error` returns a string that describes the error
			Err(why) => panic!("couldn't open {}", Error::description(&why)),
			Ok(file) => file,
		};

		// Read the file contents into a string, returns `io::Result<usize>`
		let mut s = String::new();

		match file.read_to_string(&mut s) {
			Err(why) => panic!("couldn't read {}", Error::description(&why)),
			Ok(_) => print!("{}", s),
		}
	}

	// fn parseLine(line)
}<commit_msg>Print file line by line<commit_after>use std::fs::File;
use std::io::{ BufReader, BufRead };

struct Vertex {
	x: f32,
	y: f32,
	z: f32
}

pub struct WavefrontModel {
	vertices: Vec<Vertex>
}

impl WavefrontModel {
	pub fn new(path: &'static str) {
		let file = BufReader::new(File::open(&path).unwrap());

		for line in file.lines()  {
			println!("{}", line.unwrap())
		}
	}
}
{'fraction_non_alphanumeric': 0.1851528384279476, 'fraction_numerical': 0.010480349344978166, 'mean_word_length': 4.232876712328767, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 10, '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': '2592832', 'n_tokens_mistral': 459, 'n_tokens_neox': 425, 'n_words': 115}