Skip to content

Commit bcac931

Browse files
committedMar 18, 2025
Update test for SGX now implementing read_buf
In rust-lang#108326, `read_buf` was implemented for a variety of types, but SGX was saved for later. Update a test from then, now that rust-lang#137355 implemented it for SGX types.
1 parent 43a2e9d commit bcac931

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed
 

‎library/std/src/net/tcp/tests.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,8 @@ fn read_buf() {
315315
let mut buf = BorrowedBuf::from(buf.as_mut_slice());
316316
t!(s.read_buf(buf.unfilled()));
317317
assert_eq!(buf.filled(), &[1, 2, 3, 4]);
318-
319-
// FIXME: sgx uses default_read_buf that initializes the buffer.
320-
if cfg!(not(target_env = "sgx")) {
321-
// TcpStream::read_buf should omit buffer initialization.
322-
assert_eq!(buf.init_len(), 4);
323-
}
318+
// TcpStream::read_buf should omit buffer initialization.
319+
assert_eq!(buf.init_len(), 4);
324320

325321
t.join().ok().expect("thread panicked");
326322
})

0 commit comments

Comments
 (0)