laptou / bluez-rs

Control Bluetooth on Linux.
MIT License
39 stars 9 forks source link

Various linting cleanups #27

Closed WhyNotHugo closed 2 years ago

WhyNotHugo commented 2 years ago

I was looking at bluez-rs to figure out how it works, and tweaked a few issues (a few of them rust_analyzer pointed out).

This PR is probably best read by looking at individual commits in isolation -- let me know if you'd rather I split it into multiple PRs, but each commit has a good enough explanation and is well-understandable in isolation.

I got rid of quite a few unwrap()s... again: I was mostly trying to figure out how the involved parts worked, but used the opportunity to tweak those, since it reduces the changes of panicking, even when the library is slightly misused.