From 949bf9c72eb6683394c2e23637c4bdc7a4b99fda Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Thu, 22 Oct 2026 22:27:48 +0200 Subject: [PATCH] radicle/node: Announcements only have one result For commands that may return multiple responses, a loop makes sense, but inventory announcements should expect exactly one response. --- crates/radicle/src/node.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/radicle/src/node.rs b/crates/radicle/src/node.rs index 6e873bcd7..0f39925d4 100644 --- a/crates/radicle/src/node.rs +++ b/crates/radicle/src/node.rs @@ -1413,9 +1413,9 @@ impl Handle for Node { } fn announce_inventory(&mut self) -> Result<(), Error> { - for line in self.call::(Command::AnnounceInventory, DEFAULT_TIMEOUT)? { - line?; - } + self.call::(Command::AnnounceInventory, DEFAULT_TIMEOUT)? + .next() + .ok_or(Error::EmptyResponse)??; Ok(()) }