parsers: port Iq to use the derive macros

This commit is contained in:
Jonas Schäfer 2025-04-30 18:07:47 +02:00 committed by Link Mauve
commit dc8c3eac4c
8 changed files with 486 additions and 312 deletions

View file

@ -88,8 +88,7 @@ async fn main() {
_ = ping_timer.tick() => {
log::info!("sending ping for fun & profit");
ping_ctr = ping_ctr.wrapping_add(1);
let mut iq = Iq::from_get(format!("ping-{}", ping_ctr), ping::Ping);
iq.to = Some(domain.clone());
let iq = Iq::from_get(format!("ping-{}", ping_ctr), ping::Ping).with_to(domain.clone());
stream.send(Box::new(iq.into())).await;
}
ev = stream.next() => match ev {