@@ -119,10 +119,10 @@ use tokio::io::{
119
119
///
120
120
/// ## Example 2: Compressing Data
121
121
///
122
- /// When compressing data, avoid using `SyncIoBridge` with non-async compression
123
- /// libraries, as it may lead to inefficient and blocking code. Instead, use an
124
- /// async compression library such as the [`async-compression`](https://docs.rs/async-compression/latest/async_compression/)
125
- /// crate, which is designed to work with asynchronous data streams.
122
+ /// When compressing data, the use of `SyncIoBridge` is unnecessary as it introduces
123
+ /// blocking and inefficient code. Instead, you can utilize an async compression library
124
+ /// such as the [`async-compression`](https://docs.rs/async-compression/latest/async_compression/)
125
+ /// crate, which is built to handle asynchronous data streams efficiently .
126
126
///
127
127
/// ```ignore
128
128
/// use async_compression::tokio::write::GzipEncoder;
@@ -159,9 +159,10 @@ use tokio::io::{
159
159
///
160
160
/// ## Example 3: Parsing `JSON`
161
161
///
162
- /// When parsing serialization formats such as `JSON`, avoid using `SyncIoBridge`
163
- /// with functions that `deserialize` data from a type implementing `std::io::Read`,
164
- /// such as `serde_json::from_reader`.
162
+ ///
163
+ /// `SyncIoBridge` is not ideal when parsing data formats such as `JSON`, as it
164
+ /// blocks async operations. A more efficient approach is to read data asynchronously
165
+ /// into memory and then `deserialize` it, avoding unnecessary synchronization overhead.
165
166
///
166
167
/// ```rust,no_run
167
168
/// use tokio::io::AsyncRead;
0 commit comments