rust-embedded / rust-sysfs-gpio

A Rust Interface to the Linux sysfs GPIO interface (https://www.kernel.org/doc/Documentation/gpio/sysfs.txt)
Apache License 2.0
383 stars 45 forks source link

Run rustfmt and fix warnings #58

Closed pheki closed 4 years ago

pheki commented 4 years ago

Most warnings were about deprecated fns, but some were about unused arguments in other platforms.

Two unused fn warnings remained, used only in #[cfg(any(target_os = "linux", target_os = "android"))] fns, and I'm not sure what to do about them:

flush_input_from_file and get_value_from_file

Thanks for your time!

rust-highfive commented 4 years ago

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ryankurte (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

nastevens commented 4 years ago

@pheki The warnings you're seeing are because those are private functions that are only used by other functions with #[cfg(any(target_os = "linux", target_os = "android"))] applied. It should be fine to add #[cfg(any(target_os = "linux", target_os = "android"))] to the flush_input_from_file and get_value_from_file functions

pheki commented 4 years ago

@nastevens Done!

I've also added .DS_Store to the .gitignore, which is a file sometimes created by macOS with directory metadata. I didn't think it was worth of another PR, but I'm willing to create it.

nastevens commented 4 years ago

Thanks!