about summary refs log tree commit diff
path: root/library/std/src/net
diff options
context:
space:
mode:
authorThalia Archibald <thalia@archibald.dev>2025-03-17 17:18:05 -0700
committerThalia Archibald <thalia@archibald.dev>2025-03-17 17:18:05 -0700
commitbcac931956f7a5c271914f8e1973b8195eedb498 (patch)
treef4d72dfe132a80855e95a41700f0a138f1f39562 /library/std/src/net
parent43a2e9d2c72db101f5fedac8b3acb78981b06bf2 (diff)
downloadrust-bcac931956f7a5c271914f8e1973b8195eedb498.tar.gz
rust-bcac931956f7a5c271914f8e1973b8195eedb498.zip
Update test for SGX now implementing read_buf
In #108326, `read_buf` was implemented for a variety of types, but SGX
was saved for later. Update a test from then, now that #137355
implemented it for SGX types.
Diffstat (limited to 'library/std/src/net')
-rw-r--r--library/std/src/net/tcp/tests.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/library/std/src/net/tcp/tests.rs b/library/std/src/net/tcp/tests.rs
index a7b5cdf4ec0..03003037b29 100644
--- a/library/std/src/net/tcp/tests.rs
+++ b/library/std/src/net/tcp/tests.rs
@@ -315,12 +315,8 @@ fn read_buf() {
         let mut buf = BorrowedBuf::from(buf.as_mut_slice());
         t!(s.read_buf(buf.unfilled()));
         assert_eq!(buf.filled(), &[1, 2, 3, 4]);
-
-        // FIXME: sgx uses default_read_buf that initializes the buffer.
-        if cfg!(not(target_env = "sgx")) {
-            // TcpStream::read_buf should omit buffer initialization.
-            assert_eq!(buf.init_len(), 4);
-        }
+        // TcpStream::read_buf should omit buffer initialization.
+        assert_eq!(buf.init_len(), 4);
 
         t.join().ok().expect("thread panicked");
     })