arch: serial: fix redundant slice

Fixes clippy warning for redundant slice of the whole range.

https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing

BUG=None
TEST=bin/clippy

Change-Id: I672f728adc79ff24c8287eceedf3863e9a42e4ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2864363
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
Daniel Verkamp 2021-04-30 13:07:48 -07:00 committed by Commit Bot
parent 9901c7509c
commit 87ca23156d

View file

@ -136,7 +136,7 @@ impl WriteSocket {
const SEND_RETRY: usize = 2;
let mut sent = 0;
for _ in 0..SEND_RETRY {
match self.sock.send(&buf[..]) {
match self.sock.send(buf) {
Ok(bytes_sent) => {
sent = bytes_sent;
break;