diff --git a/CHANGELOG.md b/CHANGELOG.md index 650c793c..3c17e4f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Unreleased - Simplify `Message` to use `Bytes` payload directly with simpler `Utf8Bytes` for text. - Change `CloseFrame` to use `Utf8Bytes` for `reason`. +- Re-export `Bytes`. # 0.25.0 diff --git a/src/protocol/frame/utf8.rs b/src/protocol/frame/utf8.rs index 8c0ff2d3..845c96bf 100644 --- a/src/protocol/frame/utf8.rs +++ b/src/protocol/frame/utf8.rs @@ -25,12 +25,10 @@ impl std::ops::Deref for Utf8Bytes { type Target = str; /// ``` - /// use tungstenite::protocol::frame::Utf8Bytes; - /// /// /// Example fn that takes a str slice /// fn a(s: &str) {} /// - /// let data = Utf8Bytes::from_static("foo123"); + /// let data = tungstenite::Utf8Bytes::from_static("foo123"); /// /// // auto-deref as arg /// a(&data); @@ -49,8 +47,7 @@ where for<'a> &'a str: PartialEq, { /// ``` - /// use tungstenite::protocol::frame::Utf8Bytes; - /// let payload = Utf8Bytes::from_static("foo123"); + /// let payload = tungstenite::Utf8Bytes::from_static("foo123"); /// assert_eq!(payload, "foo123"); /// assert_eq!(payload, "foo123".to_string()); /// assert_eq!(payload, &"foo123".to_string());