From 6673e3e37055e9b2c7ca2cd17fc4d592d99fb92d Mon Sep 17 00:00:00 2001 From: Nathy-bajo Date: Tue, 3 Sep 2024 17:36:04 +0100 Subject: [PATCH] Add documentation for SyncIoBridge with examples and alternatives --- tokio-util/src/io/sync_bridge.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio-util/src/io/sync_bridge.rs b/tokio-util/src/io/sync_bridge.rs index 936e95769f7..b6a42860265 100644 --- a/tokio-util/src/io/sync_bridge.rs +++ b/tokio-util/src/io/sync_bridge.rs @@ -47,7 +47,7 @@ use tokio::io::{ /// tokio::io::copy(&mut reader, &mut encoder).await?; /// ``` /// -/// ## Example 3: Parsing JSON +/// ## Example 3: Parsing `JSON` /// /// When parsing `JSON` data, avoid using `SyncIoBridge` with `serde_json::from_reader` as it may cause blocking operations. /// Instead, read the data into a `Vec` and parse it using `serde_json::from_slice`.