We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78bb922 commit 8303d40Copy full SHA for 8303d40
src/vmm/src/dumbo/tcp/endpoint.rs
@@ -223,7 +223,10 @@ impl Endpoint {
223
// We have to remove the bytes up to end from receive_buf, by shifting the
224
// others to the beginning of the buffer, and updating receive_buf_left.
225
// Also, advance the rwnd edge of the inner connection.
226
- b.copy_within(end.., 0);
+ // TODO: Maximum efficiency.
227
+ for j in 0..b.len() - end {
228
+ b[j] = b[j + end];
229
+ }
230
self.receive_buf_left -= end;
231
// Safe to unwrap because we assert that the response buffer is small
232
// enough.
@@ -647,4 +650,4 @@ mod tests {
647
650
let actual_response = parse_request_bytes(request_bytes, mock_callback);
648
651
assert_eq!(actual_response, expected_response);
649
652
}
-}
653
+}
0 commit comments