From ed012792c642712ebac26d8d7ca534d586cc153b Mon Sep 17 00:00:00 2001 From: nicolas <48695862+merklefruit@users.noreply.github.com> Date: Wed, 9 Oct 2024 20:08:20 +0200 Subject: [PATCH] nit: lint --- msg-socket/src/req/socket.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msg-socket/src/req/socket.rs b/msg-socket/src/req/socket.rs index 54ac5c5..d68be0a 100644 --- a/msg-socket/src/req/socket.rs +++ b/msg-socket/src/req/socket.rs @@ -40,7 +40,7 @@ where /// Connects to the target address with the default options. pub async fn connect(&mut self, addr: impl ToSocketAddrs) -> Result<(), ReqError> { let mut addrs = lookup_host(addr).await?; - let endpoint = addrs.next().ok_or_else(|| ReqError::NoValidEndpoints)?; + let endpoint = addrs.next().ok_or(ReqError::NoValidEndpoints)?; self.try_connect(endpoint).await }