Make the rust version more idiomatic
Merge pull request #1 from Dr-Emann/master

Make the rust version more idiomatic