Commit 17883c0
authored
Update README.md to match example in main repo (and not be broken) (#632)
Resolves #596
This grabs the example server implementation from [the root README](https://github.com/paritytech/jsonrpc#basic-usage-with-http-transport), as the given example ([rendered in docs.rs](https://paritytech.github.io/jsonrpc/jsonrpc_http_server/index.html)) currently fails with the following:
```
error[E0277]: `Result<jsonrpc_http_server::jsonrpc_core::Value, _>` is not a future
--> src/main.rs:6:5
|
6 | io.add_method("say_hello", |_| {
| ^^^^^^^^^^ `Result<jsonrpc_http_server::jsonrpc_core::Value, _>` is not a future
|
= help: the trait `std::future::Future` is not implemented for `Result<jsonrpc_http_server::jsonrpc_core::Value, _>`
= note: required because of the requirements on the impl of `RpcMethodSimple` for `[closure@src/main.rs:6:29: 8:3]`
```1 parent dc6b8ed commit 17883c0
1 file changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
0 commit comments