dcuddeback / libusb-rs

A safe Rust wrapper for libusb.
MIT License
199 stars 64 forks source link

Run through rustfmt, update to Rust 2018, rework to use Arc instead of lifetimes. #30

Open jeamland opened 5 years ago

jeamland commented 5 years ago

Yes, this is probably too many changes in one PR but if you're interested I'm willing to do the work in splitting them out.

323bce9 just runs all the code through rustfmt. dd035dc removes a couple of mut declarations the linter was complaining about. b4cee90 updates everything to Rust 2018. fc27e0c is the big one: it removes the explicit lifetime declarations and uses Rc instead to maintain pointers without needing consumers of the library to explicitly declare lifetimes too.

All tests still pass.

decentninja commented 5 years ago

I had some issues with the current API, but using this branch fixed it and seem to work fine.

BroderickCarlin commented 5 years ago

What is the current state of this PR?