mirror of
https://github.com/rwf2/Rocket.git
synced 2025-01-19 16:09:08 +00:00
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
Block a user