Skip to content

Commit 96647b3

Browse files
authored
fix examples so they don't panic (#658)
1 parent e724d08 commit 96647b3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/examples/async.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fn main() {
99
});
1010

1111
let request = r#"{"jsonrpc": "2.0", "method": "say_hello", "params": [42, 23], "id": 1}"#;
12-
let response = r#"{"jsonrpc":"2.0","result":"hello","id":1}"#;
12+
let response = r#"{"jsonrpc":"2.0","result":"Hello World!","id":1}"#;
1313

1414
assert_eq!(io.handle_request(request).await, Some(response.to_owned()));
1515
});

core/examples/basic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ fn main() {
66
io.add_sync_method("say_hello", |_: Params| Ok(Value::String("Hello World!".to_owned())));
77

88
let request = r#"{"jsonrpc": "2.0", "method": "say_hello", "params": [42, 23], "id": 1}"#;
9-
let response = r#"{"jsonrpc":"2.0","result":"hello","id":1}"#;
9+
let response = r#"{"jsonrpc":"2.0","result":"Hello World!","id":1}"#;
1010

1111
assert_eq!(io.handle_request_sync(request), Some(response.to_owned()));
1212
}

0 commit comments

Comments
 (0)