rust: bssl-tls: Drop Sync on BIO objects

Since BIO objects are always accessed through SSL which is typed so that
it can be access only from one owner thread.

This means that there is no more use of the safety guarantee for Sync.



Bug: 479599893

Signed-off-by: Xiangfei Ding <xfding@google.com>
Change-Id: If8742c979667f912a11cc656b28390dd6a6a6964
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/93107
Reviewed-by: Rudolf Polzer <rpolzer@google.com>
Reviewed-by: Adam Langley <agl@google.com>
Presubmit-BoringSSL-Verified: boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/rust/bssl-tls/src/io.rs b/rust/bssl-tls/src/io.rs
index b1e23ea..81ec098 100644
--- a/rust/bssl-tls/src/io.rs
+++ b/rust/bssl-tls/src/io.rs
@@ -66,11 +66,6 @@
     io_err: Option<Box<dyn core::error::Error + Send + Sync>>,
 }
 
-/// Safety: `socket` field is an exclusively owned `Box<dyn AbstractSocket>` pointer,
-/// and `AbstractSocket: Send + Sync`.
-unsafe impl Send for RustBio {}
-unsafe impl Sync for RustBio {}
-
 fn _assert_rust_bio()
 where
     RustBio: Send + Unpin,
@@ -276,7 +271,7 @@
 }
 
 /// Abstract reader.
-pub trait AbstractReader: Send + Sync + Unpin {
+pub trait AbstractReader: Send {
     /// Read data from the socket.
     fn read(
         &mut self,
@@ -286,7 +281,7 @@
 }
 
 /// Abstract writer.
-pub trait AbstractWriter: Send + Sync + Unpin {
+pub trait AbstractWriter: Send {
     /// Write data to the socket.
     fn write(&mut self, async_ctx: Option<&mut Context<'_>>, buffer: &[u8])
     -> AbstractSocketResult;