From a9fd06f2c5432c978f94e833f803ad9abfdb6f71 Mon Sep 17 00:00:00 2001 From: Maarten de Vries Date: Sun, 19 Nov 2023 11:51:33 +0100 Subject: [PATCH] Unmerge use statements in example. --- README.md | 8 +++++--- examples/server.rs | 8 +++++--- src/lib.rs | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e81ecb4..3eefb2a 100644 --- a/README.md +++ b/README.md @@ -17,11 +17,13 @@ you can manually inspect the `Connection` and `Upgrade` headers. ## Example ```rust -use futures::{sink::SinkExt, stream::StreamExt}; +use futures::sink::SinkExt; +use futures::stream::StreamExt; use http_body_util::Full; -use hyper::{body::{Bytes, Incoming}, Request, Response}; -use hyper_util::rt::TokioIo; +use hyper::body::{Bytes, Incoming}; +use hyper::{Request, Response}; use hyper_tungstenite::{tungstenite, HyperWebsocket}; +use hyper_util::rt::TokioIo; use tungstenite::Message; type Error = Box; diff --git a/examples/server.rs b/examples/server.rs index 0ab1d6f..dd47581 100644 --- a/examples/server.rs +++ b/examples/server.rs @@ -1,8 +1,10 @@ -use futures::{sink::SinkExt, stream::StreamExt}; +use futures::sink::SinkExt; +use futures::stream::StreamExt; use http_body_util::Full; -use hyper::{body::{Bytes, Incoming}, Request, Response}; -use hyper_util::rt::TokioIo; +use hyper::body::{Bytes, Incoming}; +use hyper::{Request, Response}; use hyper_tungstenite::{tungstenite, HyperWebsocket}; +use hyper_util::rt::TokioIo; use tungstenite::Message; type Error = Box; diff --git a/src/lib.rs b/src/lib.rs index 6d51917..7538b32 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,11 +12,13 @@ //! //! # Example //! ```no_run -//! use futures::{sink::SinkExt, stream::StreamExt}; +//! use futures::sink::SinkExt; +//! use futures::stream::StreamExt; //! use http_body_util::Full; -//! use hyper::{body::{Bytes, Incoming}, Request, Response}; -//! use hyper_util::rt::TokioIo; +//! use hyper::body::{Bytes, Incoming}; +//! use hyper::{Request, Response}; //! use hyper_tungstenite::{tungstenite, HyperWebsocket}; +//! use hyper_util::rt::TokioIo; //! use tungstenite::Message; //! //! type Error = Box;