obj_2_rust 0.1.5

Macro to bring an obj file into rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::{
    fs::File,
    io::{BufRead, BufReader, Lines},
    path::Path,
};

pub fn read_lines<P>(path: P) -> std::io::Result<Lines<BufReader<File>>>
where
    P: AsRef<Path>,
{
    let file = File::open(path)?;
    Ok(BufReader::new(file).lines())
}