Skip to content

Commit 87776ac

Browse files
authored
Merge pull request #544 from est31/master
Add note about issue 160 to from_reader function
2 parents efe3dc1 + db068f4 commit 87776ac

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/de.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2193,8 +2193,15 @@ where
21932193
/// as a [`File`], you will want to apply your own buffering because serde_json
21942194
/// will not buffer the input. See [`std::io::BufReader`].
21952195
///
2196+
/// Note that counter to intuition, this function is usually slower than
2197+
/// reading a file completely into memory and then applying [`from_str`]
2198+
/// or [`from_slice`] on it. See [issue #160].
2199+
///
21962200
/// [`File`]: https://doc.rust-lang.org/std/fs/struct.File.html
2197-
/// [`BufReader`]: https://doc.rust-lang.org/std/io/struct.BufReader.html
2201+
/// [`std::io::BufReader`]: https://doc.rust-lang.org/std/io/struct.BufReader.html
2202+
/// [`from_str`]: ./fn.from_str.html
2203+
/// [`from_slice`]: ./fn.from_slice.html
2204+
/// [issue #160]: https://github.com/serde-rs/json/issues/160
21982205
///
21992206
/// # Example
22002207
///

0 commit comments

Comments
 (0)