Skip to content

Commit 8303d40

Browse files
andr3wyhimanshur-devGoldin Vo
committed
Reduce test verbosity in arp.rs
Signed-off-by: Andrew Yao <[email protected]> Co-authored-by: Himanshu Reddy <[email protected]> Co-authored-by: Goldin Vo <[email protected]> Signed-off-by: Andrew Yao <[email protected]>
1 parent 78bb922 commit 8303d40

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/vmm/src/dumbo/tcp/endpoint.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,10 @@ impl Endpoint {
223223
// We have to remove the bytes up to end from receive_buf, by shifting the
224224
// others to the beginning of the buffer, and updating receive_buf_left.
225225
// Also, advance the rwnd edge of the inner connection.
226-
b.copy_within(end.., 0);
226+
// TODO: Maximum efficiency.
227+
for j in 0..b.len() - end {
228+
b[j] = b[j + end];
229+
}
227230
self.receive_buf_left -= end;
228231
// Safe to unwrap because we assert that the response buffer is small
229232
// enough.
@@ -647,4 +650,4 @@ mod tests {
647650
let actual_response = parse_request_bytes(request_bytes, mock_callback);
648651
assert_eq!(actual_response, expected_response);
649652
}
650-
}
653+
}

0 commit comments

Comments
 (0)