mirror of https://github.com/rwf2/Rocket.git
Fix contrib 'ws' README formatting.
This commit is contained in:
parent
c3520fb4a1
commit
db96f670b7
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue