needless_return

unneeded `return` statement
This commit is contained in:
Chris Denton 2023-11-22 12:59:22 +00:00
parent ad12be3668
commit 533de2bc41
No known key found for this signature in database
GPG Key ID: 713472F2F45627DE
1 changed files with 1 additions and 1 deletions

View File

@ -266,7 +266,7 @@ impl io::Read for Stdin {
let mut bytes_copied = self.incomplete_utf8.read(buf);
if bytes_copied == buf.len() {
return Ok(bytes_copied);
Ok(bytes_copied)
} else if buf.len() - bytes_copied < 4 {
// Not enough space to get a UTF-8 byte. We will use the incomplete UTF8.
let mut utf16_buf = [MaybeUninit::new(0); 1];