New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-export Qos type (from mqtt3) #18

Open
tshepang opened this Issue Apr 26, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@tshepang
Contributor

tshepang commented Apr 26, 2017

One use I saw is PubOpt::new, whose first arg is Qos. At the moment, I have to add mqtt3 do Cargo.toml, which I would rather avoid (since it's an implicit dependency).

@tshepang

This comment has been minimized.

Show comment
Hide comment
@tshepang

tshepang Apr 26, 2017

Contributor

Alternatively, maybe remove the new call since it does not seem to add anything? One can just do something like:

let opts = PubOpt::at_least_once() | PubOpt::retain();
// in place of
let opts = PubOpt::new(mqtt3::QoS::AtLeastOnce, true);

The former is more explicit, while the latter has some magical second argument.

Contributor

tshepang commented Apr 26, 2017

Alternatively, maybe remove the new call since it does not seem to add anything? One can just do something like:

let opts = PubOpt::at_least_once() | PubOpt::retain();
// in place of
let opts = PubOpt::new(mqtt3::QoS::AtLeastOnce, true);

The former is more explicit, while the latter has some magical second argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment