From 7240d99c0f3cbcdcbaaff79810812862890023fb Mon Sep 17 00:00:00 2001 From: Max Inden Date: Fri, 13 Dec 2024 18:04:44 +0100 Subject: [PATCH] refactor(udp): remove unnecessary `return` No need to `return Ok(())` early, given the final `return Ok(())` at the end of the function. Makes it consistent with other `send` implementations. Makes it consistent with early returns being errors only. --- quinn-udp/src/unix.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/quinn-udp/src/unix.rs b/quinn-udp/src/unix.rs index 55bd21059..db7c3ced3 100644 --- a/quinn-udp/src/unix.rs +++ b/quinn-udp/src/unix.rs @@ -341,8 +341,6 @@ fn send( if e.raw_os_error() != Some(libc::EMSGSIZE) { return Err(e); } - - return Ok(()); } } }