Skip to content

Commit 1076065

Browse files
authored
Fix typo in Closure example code (#2174)
1 parent cc36bdc commit 1076065

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/closures/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub fn run() -> Result<(), JsValue> {
5555
//
5656
// Note the usage of `Closure` here because the closure is "long lived",
5757
// basically meaning it has to persist beyond the call to this one function.
58-
// Also of note here is the `.as_ref().unchecked_ref()` chain, which is who
58+
// Also of note here is the `.as_ref().unchecked_ref()` chain, which is how
5959
// you can extract `&Function`, what `web-sys` expects, from a `Closure`
6060
// which only hands you `&JsValue` via `AsRef`.
6161
fn setup_clock(window: &Window, document: &Document) -> Result<(), JsValue> {

0 commit comments

Comments
 (0)