AtherEnergy / rumqtt

Pure rust mqtt cilent
The Unlicense
202 stars 71 forks source link

Simplify passing generated IDs into `set_client_id`. #57

Closed ArtemGr closed 7 years ago

ArtemGr commented 7 years ago

The unique client ID passed to set_client_id will often be generated (otherwise it might be hard to keep it unique). set_client_id was accepting a&str reference which makes passing a generating ID much harder and makes no sense performance-wise because set_client_id was converting it back to String anyways. With this patch it is possible to pass a generated String to set_client_id directly. It's even faster, because the generated String can now be moved and not copied.

tekjar commented 7 years ago

Thanks @ArtemGr :)