google / open-location-code

Open Location Code is a library to generate short codes, called "plus codes", that can be used as digital addresses where street addresses don't exist.
https://plus.codes
Apache License 2.0
4.06k stars 472 forks source link

Make argument names more idiomatic #355

Closed fintelia closed 5 years ago

fintelia commented 5 years ago

In Rust, a leading underscore in a variable name/argument name means that the variable is unused, which isn't the case here. This PR impacts the generated documentation / readability of the code, but otherwise impact behavior.

It would also be more idiomatic to avoid allocating Strings instead these functions in a couple places either by avoiding mutation altogether (there's no need to physically remove the padding characters) or by having functions take Strings instead of &str's. However, such changes would be more invasive so I held off doing them for now

zongweil commented 5 years ago

Thanks for your contribution!