Skip to content

Commit d968998

Browse files
committed
input filename
1 parent b02a8fd commit d968998

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/inputs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ pub fn cli_matches<'a>() -> ArgMatches<'a> {
66
.author("Mitchell Hynes. <[email protected]>")
77
.about("A toy for rendering 3D objects in the command line")
88
.arg(
9-
Arg::with_name("OBJ INPUT")
10-
.help("Sets the input obj file to render")
9+
Arg::with_name("INPUT FILENAME")
10+
.help("Sets the input file to render")
1111
.required(true)
1212
.index(1),
1313
)

src/main.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ fn to_meshes(models: Vec<tobj::Model>, materials: Vec<tobj::Material>) -> Vec<Si
2727
fn main() {
2828
let matches = cli_matches(); // Read command line arguments
2929
let mut mesh_queue: Vec<SimpleMesh> = vec![]; // A list of meshes to render
30-
let error = |s: &str, e: &str| -> Vec<SimpleMesh> {
31-
println!("filename: [{}] couldn't load, {}. {}", slice, s, e);
32-
vec![]
33-
};
34-
for slice in matches.value_of("OBJ INPUT").unwrap().split(' ') {
30+
for slice in matches.value_of("INPUT FILENAME").unwrap().split(' ') {
31+
let error = |s: &str, e: &str| -> Vec<SimpleMesh> {
32+
println!("filename: [{}] couldn't load, {}. {}", slice, s, e);
33+
vec![]
34+
};
3535
// Fill list with file inputs (Splits for spaces -> multiple files)
3636
let path = Path::new(slice);
3737
let mut meshes = match path.extension() {

0 commit comments

Comments
 (0)