Please use the edit post feature instead of posting a new topic.
You can give on_message
a borrow of the m
variable like this:
fn on_message(m: &mut mosq::Mosquitto) {
...
}
fn main() {
...
on_message(&mut m);
...
}
Please use the edit post feature instead of posting a new topic.
You can give on_message
a borrow of the m
variable like this:
fn on_message(m: &mut mosq::Mosquitto) {
...
}
fn main() {
...
on_message(&mut m);
...
}