Fix contrib 'ws' README formatting.

This commit is contained in:
Sergio Benitez 2023-04-04 15:37:22 -07:00
parent c3520fb4a1
commit db96f670b7
1 changed files with 10 additions and 10 deletions

View File

@ -21,15 +21,15 @@ This crate provides WebSocket support for Rocket via integration with Rocket's
2. Use it!
```rust
#[get("/echo")]
fn echo_stream(ws: ws::WebSocket) -> ws::Stream!['static] {
ws::stream! { ws =>
for await message in ws {
yield message?;
}
}
}
```
```rust
#[get("/echo")]
fn echo_stream(ws: ws::WebSocket) -> ws::Stream!['static] {
ws::stream! { ws =>
for await message in ws {
yield message?;
}
}
}
```
See the [crate docs] for full details.