Open tshepang opened 7 years ago
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.
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).