From 376ad649545ec15ae6c4c59ffefe71be9e1992e3 Mon Sep 17 00:00:00 2001 From: Arturas Molcanovas Date: Mon, 27 Dec 2021 10:20:12 +0200 Subject: [PATCH] docs: Fix set_on_upgrade_needed example --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9a3b9ce..8c9e731 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -45,7 +45,7 @@ dependencies = [ [[package]] name = "indexed_db_futures" -version = "0.2.1" +version = "0.2.2" dependencies = [ "cfg-if 1.0.0", "js-sys", diff --git a/Cargo.toml b/Cargo.toml index 46404da..a8c6fcd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "indexed_db_futures" -version = "0.2.1" +version = "0.2.2" authors = ["Arturas Molcanovas "] edition = "2018" license = "MIT" diff --git a/src/lib.rs b/src/lib.rs index fa00c70..90012de 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -43,7 +43,7 @@ //! pub async fn example() -> Result<(), DomException> { //! // Open my_db v1 //! let mut db_req: OpenDbRequest = IdbDatabase::open_u32("my_db", 1)?; -//! db_req.set_on_upgrade_needed(Some(|evt: IdbVersionChangeEvent| -> Result<(), JsValue> { +//! db_req.set_on_upgrade_needed(Some(|evt: &IdbVersionChangeEvent| -> Result<(), JsValue> { //! // Check if the object store exists; create it if it doesn't //! if let None = evt.db().object_store_names().find(|n| n == "my_store") { //! evt.db().create_object_store("my_store")?;