Skip to content

Commit

Permalink
Unmerge use statements in example.
Browse files Browse the repository at this point in the history
  • Loading branch information
de-vri-es committed Nov 19, 2023
1 parent b3aa745 commit a9fd06f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<dyn std::error::Error + Send + Sync + 'static>;
Expand Down
8 changes: 5 additions & 3 deletions examples/server.rs
Original file line number Diff line number Diff line change
@@ -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<dyn std::error::Error + Send + Sync + 'static>;
Expand Down
8 changes: 5 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<dyn std::error::Error + Send + Sync + 'static>;
Expand Down

0 comments on commit a9fd06f

Please sign in to comment.