Skip to content

Commit 6f7615a

Browse files
kiuberHeavenVolkoff
authored andcommitted
chore: input_buffer is better here
1 parent 3810433 commit 6f7615a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/mesh.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ impl Mesh {
113113
"-" => {
114114
// create_stl_reader requires Seek, so we must read the entire stream into memory before proceeding.
115115
// So I guess this can just consume all RAM if it gets bad input. Hmmm....
116-
let mut model_buffer = Vec::new();
117-
io::stdin().read_to_end(&mut model_buffer)?;
118-
Mesh::from_stl(Cursor::new(model_buffer), recalc_normals)
116+
let mut input_buffer = Vec::new();
117+
io::stdin().read_to_end(&mut input_buffer)?;
118+
Mesh::from_stl(Cursor::new(input_buffer), recalc_normals)
119119
}
120120
_ => {
121121
let model_filename = std::path::Path::new(model_filename);

0 commit comments

Comments
 (0)