elliot40404 / bonk

The blazingly fast touch alternative with a sprinkle of mkdir written in rust.
MIT License
97 stars 9 forks source link

Removes Vec allocation #1

Closed pwoolcoc closed 1 year ago

pwoolcoc commented 1 year ago

It looks like you are allocating a Vec and then immediately turning it back into an iterator, you can skip the allocation and just use the env::args iterator directly

van-sprundel commented 1 year ago

Looks like OP is relatively new to Rust. Not trying to discourage at all, I think this project could lead to something interesting!

As for another big sore thumb, you don't need to return true in your check_if_dir function, just return the condition