From a6be73eecbb2646549182443decdd433fb791ccf Mon Sep 17 00:00:00 2001 From: Weijia Jiang Date: Fri, 8 Sep 2023 21:59:48 +0800 Subject: [PATCH] codec: document the line ending used by `LinesCodec` (#5982) --- tokio-util/src/codec/lines_codec.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tokio-util/src/codec/lines_codec.rs b/tokio-util/src/codec/lines_codec.rs index 7a0a8f045..5a6035d13 100644 --- a/tokio-util/src/codec/lines_codec.rs +++ b/tokio-util/src/codec/lines_codec.rs @@ -6,6 +6,8 @@ use std::{cmp, fmt, io, str, usize}; /// A simple [`Decoder`] and [`Encoder`] implementation that splits up data into lines. /// +/// This uses the `\n` character as the line ending on all platforms. +/// /// [`Decoder`]: crate::codec::Decoder /// [`Encoder`]: crate::codec::Encoder #[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]