Make the rust version more idiomatic