mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-03 16:12:29 +03:00
The example should output "Hello from Rust!" (#1931)
* Make console output "Hello from Rust!" The HTML says the console would output Hello from Rust!, but instead it outputs Hello, World! This is a proposed fix. * Output "Hello from Rust!" The HTML says the console would output "Hello from Rust!" but instead it outputs "Hello, World!". This is a proposed fix.
This commit is contained in:
parent
1548953364
commit
aab99feb3e
@ -1,5 +1,5 @@
|
||||
export function name() {
|
||||
return 'World';
|
||||
return 'Rust';
|
||||
}
|
||||
|
||||
export class MyClass {
|
||||
|
@ -26,7 +26,7 @@ extern "C" {
|
||||
|
||||
#[wasm_bindgen(start)]
|
||||
pub fn run() {
|
||||
log(&format!("Hello, {}!", name()));
|
||||
log(&format!("Hello from {}!", name())); // should output "Hello from Rust!"
|
||||
|
||||
let x = MyClass::new();
|
||||
assert_eq!(x.number(), 42);
|
||||
|
Loading…
Reference in New Issue
Block a user