diff --git a/Cargo.lock b/Cargo.lock index 2380c2828..5dde5eeaf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,9 +8,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "base64" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "block-buffer" @@ -45,11 +45,20 @@ version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +[[package]] +name = "cosmwasm-derive" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de70197a0fe4e402aa260da00ec62d9bf091afe87866e9f3347691d591b60f89" +dependencies = [ + "syn", +] + [[package]] name = "cosmwasm-schema" -version = "0.12.2" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5e44706f0bebf7316d73a01a08a8b1a8d58d346265f0a2c5b119f54194c89b" +checksum = "a98b56c1c839e5cfda1be0e0f152728b34bdcd5a2e921905947f6d088bab2c68" dependencies = [ "schemars", "serde_json", @@ -57,11 +66,12 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "0.12.2" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b176378aa26b13d2785afc37d0d92407a1a93fecf8006e49368173c91239a70" +checksum = "02173c4eb78ef76863f5190f60a45278d11e7c8b142327c149e18128b2b97f85" dependencies = [ "base64", + "cosmwasm-derive", "schemars", "serde", "serde-json-wasm", @@ -70,9 +80,9 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "0.12.2" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d18fb0e51649e4f2d96469504499294afba1a747b62739027f3e357048821de2" +checksum = "e2cdb5f6c3181c921c02b0018af66178e60bc7be088f81ec730b22ff51240404" dependencies = [ "cosmwasm-std", "serde", diff --git a/contracts/cw1-subkeys/Cargo.toml b/contracts/cw1-subkeys/Cargo.toml index 163ac1234..8082a1240 100644 --- a/contracts/cw1-subkeys/Cargo.toml +++ b/contracts/cw1-subkeys/Cargo.toml @@ -22,11 +22,11 @@ cw0 = { path = "../../packages/cw0", version = "0.4.0" } cw1 = { path = "../../packages/cw1", version = "0.4.0" } cw2 = { path = "../../packages/cw2", version = "0.4.0" } cw1-whitelist = { path = "../cw1-whitelist", version = "0.4.0", features = ["library"] } -cosmwasm-std = { version = "0.12.2", features = ["iterator", "staking"] } -cosmwasm-storage = { version = "0.12.2", features = ["iterator"] } +cosmwasm-std = { version = "0.13.2", features = ["iterator", "staking"] } +cosmwasm-storage = { version = "0.13.2", features = ["iterator"] } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.20" } [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } diff --git a/contracts/cw1-whitelist/Cargo.toml b/contracts/cw1-whitelist/Cargo.toml index 9466aef7e..f6a7635c0 100644 --- a/contracts/cw1-whitelist/Cargo.toml +++ b/contracts/cw1-whitelist/Cargo.toml @@ -21,11 +21,11 @@ library = [] cw0 = { path = "../../packages/cw0", version = "0.4.0" } cw1 = { path = "../../packages/cw1", version = "0.4.0" } cw2 = { path = "../../packages/cw2", version = "0.4.0" } -cosmwasm-std = { version = "0.12.2", features = ["iterator"] } -cosmwasm-storage = { version = "0.12.2", features = ["iterator"] } +cosmwasm-std = { version = "0.13.2", features = ["iterator"] } +cosmwasm-storage = { version = "0.13.2", features = ["iterator"] } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.20" } [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } diff --git a/contracts/cw20-atomic-swap/Cargo.toml b/contracts/cw20-atomic-swap/Cargo.toml index c86000277..33f6b8822 100644 --- a/contracts/cw20-atomic-swap/Cargo.toml +++ b/contracts/cw20-atomic-swap/Cargo.toml @@ -18,8 +18,8 @@ library = [] cw0 = { path = "../../packages/cw0", version = "0.4.0" } cw2 = { path = "../../packages/cw2", version = "0.4.0" } cw20 = { path = "../../packages/cw20", version = "0.4.0" } -cosmwasm-std = { version = "0.12.2", features = ["iterator"] } -cosmwasm-storage = { version = "0.12.2", features = ["iterator"] } +cosmwasm-std = { version = "0.13.2", features = ["iterator"] } +cosmwasm-storage = { version = "0.13.2", features = ["iterator"] } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.20" } @@ -27,4 +27,4 @@ hex = "0.3.1" sha2 = "0.8.0" [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } diff --git a/contracts/cw20-base/Cargo.toml b/contracts/cw20-base/Cargo.toml index d9504550b..3d0fc7592 100644 --- a/contracts/cw20-base/Cargo.toml +++ b/contracts/cw20-base/Cargo.toml @@ -21,11 +21,11 @@ library = [] cw0 = { path = "../../packages/cw0", version = "0.4.0" } cw2 = { path = "../../packages/cw2", version = "0.4.0" } cw20 = { path = "../../packages/cw20", version = "0.4.0" } -cosmwasm-std = { version = "0.12.2", features = ["iterator"] } -cosmwasm-storage = { version = "0.12.2", features = ["iterator"] } +cosmwasm-std = { version = "0.13.2", features = ["iterator"] } +cosmwasm-storage = { version = "0.13.2", features = ["iterator"] } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.20" } [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } diff --git a/contracts/cw20-bonding/Cargo.toml b/contracts/cw20-bonding/Cargo.toml index 354813cc5..cdfaf7844 100644 --- a/contracts/cw20-bonding/Cargo.toml +++ b/contracts/cw20-bonding/Cargo.toml @@ -25,7 +25,7 @@ cw2 = { path = "../../packages/cw2", version = "0.4.0" } cw20 = { path = "../../packages/cw20", version = "0.4.0" } cw20-base = { path = "../../contracts/cw20-base", version = "0.4.0", features = ["library"] } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.4.0" } -cosmwasm-std = { version = "0.12.2", features = ["staking"] } +cosmwasm-std = { version = "0.13.2", features = ["staking"] } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.20" } @@ -33,4 +33,4 @@ rust_decimal = { version = "1.8.1" } num-integer = { version = "0.1.44" } [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } diff --git a/contracts/cw20-escrow/Cargo.toml b/contracts/cw20-escrow/Cargo.toml index 59a4b8eb3..6b3071827 100644 --- a/contracts/cw20-escrow/Cargo.toml +++ b/contracts/cw20-escrow/Cargo.toml @@ -21,13 +21,13 @@ library = [] cw0 = { path = "../../packages/cw0", version = "0.4.0" } cw2 = { path = "../../packages/cw2", version = "0.4.0" } cw20 = { path = "../../packages/cw20", version = "0.4.0" } -cosmwasm-std = { version = "0.12.2", features = ["iterator"] } -cosmwasm-storage = { version = "0.12.2", features = ["iterator"] } +cosmwasm-std = { version = "0.13.2", features = ["iterator"] } +cosmwasm-storage = { version = "0.13.2", features = ["iterator"] } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.20" } [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } cw-multi-test = { path = "../../packages/multi-test", version = "0.4.0" } cw20-base = { path = "../cw20-base", version = "0.4.0", features = ["library"] } diff --git a/contracts/cw20-staking/Cargo.toml b/contracts/cw20-staking/Cargo.toml index dbfc1a4fc..8271dfb1e 100644 --- a/contracts/cw20-staking/Cargo.toml +++ b/contracts/cw20-staking/Cargo.toml @@ -25,11 +25,11 @@ cw2 = { path = "../../packages/cw2", version = "0.4.0" } cw20 = { path = "../../packages/cw20", version = "0.4.0" } cw-controllers = { path = "../../packages/controllers", version = "0.4.0" } cw20-base = { path = "../../contracts/cw20-base", version = "0.4.0", features = ["library"] } -cosmwasm-std = { version = "0.12.2", features = ["staking"] } -cosmwasm-storage = { version = "0.12.2" } +cosmwasm-std = { version = "0.13.2", features = ["staking"] } +cosmwasm-storage = { version = "0.13.2" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.20" } [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } diff --git a/contracts/cw3-fixed-multisig/Cargo.toml b/contracts/cw3-fixed-multisig/Cargo.toml index e8e95690a..56bf7bbf9 100644 --- a/contracts/cw3-fixed-multisig/Cargo.toml +++ b/contracts/cw3-fixed-multisig/Cargo.toml @@ -22,10 +22,10 @@ cw0 = { path = "../../packages/cw0", version = "0.4.0" } cw2 = { path = "../../packages/cw2", version = "0.4.0" } cw3 = { path = "../../packages/cw3", version = "0.4.0" } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.4.0", features = ["iterator"] } -cosmwasm-std = { version = "0.12.2", features = ["iterator"] } +cosmwasm-std = { version = "0.13.2", features = ["iterator"] } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.20" } [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } diff --git a/contracts/cw3-flex-multisig/Cargo.toml b/contracts/cw3-flex-multisig/Cargo.toml index 8b47d1fd4..0998aa463 100644 --- a/contracts/cw3-flex-multisig/Cargo.toml +++ b/contracts/cw3-flex-multisig/Cargo.toml @@ -23,12 +23,12 @@ cw2 = { path = "../../packages/cw2", version = "0.4.0" } cw3 = { path = "../../packages/cw3", version = "0.4.0" } cw4 = { path = "../../packages/cw4", version = "0.4.0" } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.4.0", features = ["iterator"] } -cosmwasm-std = { version = "0.12.2", features = ["iterator"] } +cosmwasm-std = { version = "0.13.2", features = ["iterator"] } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.20" } [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } cw4-group = { path = "../cw4-group", version = "0.4.0" } cw-multi-test = { path = "../../packages/multi-test", version = "0.4.0" } diff --git a/contracts/cw4-group/Cargo.toml b/contracts/cw4-group/Cargo.toml index 6ebc6d15a..5aa1323bd 100644 --- a/contracts/cw4-group/Cargo.toml +++ b/contracts/cw4-group/Cargo.toml @@ -31,10 +31,10 @@ cw2 = { path = "../../packages/cw2", version = "0.4.0" } cw4 = { path = "../../packages/cw4", version = "0.4.0" } cw-controllers = { path = "../../packages/controllers", version = "0.4.0" } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.4.0", features = ["iterator"] } -cosmwasm-std = { version = "0.12.2" } +cosmwasm-std = { version = "0.13.2" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.21" } [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } diff --git a/contracts/cw4-stake/Cargo.toml b/contracts/cw4-stake/Cargo.toml index 61c824e7a..082baee7e 100644 --- a/contracts/cw4-stake/Cargo.toml +++ b/contracts/cw4-stake/Cargo.toml @@ -31,10 +31,10 @@ cw2 = { path = "../../packages/cw2", version = "0.4.0" } cw4 = { path = "../../packages/cw4", version = "0.4.0" } cw-controllers = { path = "../../packages/controllers", version = "0.4.0" } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.4.0", features = ["iterator"] } -cosmwasm-std = { version = "0.12.2" } +cosmwasm-std = { version = "0.13.2" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.21" } [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } diff --git a/contracts/cw721-base/Cargo.toml b/contracts/cw721-base/Cargo.toml index f6313dec6..c04151446 100644 --- a/contracts/cw721-base/Cargo.toml +++ b/contracts/cw721-base/Cargo.toml @@ -29,10 +29,10 @@ cw0 = { path = "../../packages/cw0", version = "0.4.0" } cw2 = { path = "../../packages/cw2", version = "0.4.0" } cw721 = { path = "../../packages/cw721", version = "0.4.0" } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.4.0" , features = ["iterator"]} -cosmwasm-std = { version = "0.12.2" } +cosmwasm-std = { version = "0.13.2" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.20" } [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } diff --git a/packages/controllers/Cargo.toml b/packages/controllers/Cargo.toml index fe8fc6956..99e90023d 100644 --- a/packages/controllers/Cargo.toml +++ b/packages/controllers/Cargo.toml @@ -12,7 +12,7 @@ documentation = "https://docs.cosmwasm.com" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cosmwasm-std = { version = "0.12.2" } +cosmwasm-std = { version = "0.13.2" } cw0 = { path = "../cw0", version = "0.4.0" } cw-storage-plus = { path = "../storage-plus", version = "0.4.0", features = ["iterator"] } schemars = "0.7" diff --git a/packages/cw0/Cargo.toml b/packages/cw0/Cargo.toml index 1d0929047..8f8432fee 100644 --- a/packages/cw0/Cargo.toml +++ b/packages/cw0/Cargo.toml @@ -12,7 +12,7 @@ documentation = "https://docs.cosmwasm.com" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cosmwasm-std = { version = "0.12.2" } +cosmwasm-std = { version = "0.13.2" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.21" } diff --git a/packages/cw1/Cargo.toml b/packages/cw1/Cargo.toml index e7ae54bba..8c64d6a2c 100644 --- a/packages/cw1/Cargo.toml +++ b/packages/cw1/Cargo.toml @@ -10,9 +10,9 @@ homepage = "https://cosmwasm.com" documentation = "https://docs.cosmwasm.com" [dependencies] -cosmwasm-std = { version = "0.12.2" } +cosmwasm-std = { version = "0.13.2" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } diff --git a/packages/cw2/Cargo.toml b/packages/cw2/Cargo.toml index 0a889e5e7..9aacbef96 100644 --- a/packages/cw2/Cargo.toml +++ b/packages/cw2/Cargo.toml @@ -10,7 +10,7 @@ homepage = "https://cosmwasm.com" documentation = "https://docs.cosmwasm.com" [dependencies] -cosmwasm-std = { version = "0.12.2" } +cosmwasm-std = { version = "0.13.2" } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.4.0" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/packages/cw20/Cargo.toml b/packages/cw20/Cargo.toml index fa8f8c130..0b39817cb 100644 --- a/packages/cw20/Cargo.toml +++ b/packages/cw20/Cargo.toml @@ -11,9 +11,9 @@ documentation = "https://docs.cosmwasm.com" [dependencies] cw0 = { path = "../../packages/cw0", version = "0.4.0" } -cosmwasm-std = { version = "0.12.2" } +cosmwasm-std = { version = "0.13.2" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } diff --git a/packages/cw3/Cargo.toml b/packages/cw3/Cargo.toml index 8e31c5734..48282bd88 100644 --- a/packages/cw3/Cargo.toml +++ b/packages/cw3/Cargo.toml @@ -11,9 +11,9 @@ documentation = "https://docs.cosmwasm.com" [dependencies] cw0 = { path = "../../packages/cw0", version = "0.4.0" } -cosmwasm-std = { version = "0.12.2" } +cosmwasm-std = { version = "0.13.2" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } diff --git a/packages/cw4/Cargo.toml b/packages/cw4/Cargo.toml index cfb1c9518..ac91be1a2 100644 --- a/packages/cw4/Cargo.toml +++ b/packages/cw4/Cargo.toml @@ -10,9 +10,9 @@ homepage = "https://cosmwasm.com" documentation = "https://docs.cosmwasm.com" [dependencies] -cosmwasm-std = { version = "0.12.2" } +cosmwasm-std = { version = "0.13.2" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } diff --git a/packages/cw721/Cargo.toml b/packages/cw721/Cargo.toml index 4c5800287..1bb0c67cd 100644 --- a/packages/cw721/Cargo.toml +++ b/packages/cw721/Cargo.toml @@ -11,9 +11,9 @@ documentation = "https://docs.cosmwasm.com" [dependencies] cw0 = { path = "../../packages/cw0", version = "0.4.0" } -cosmwasm-std = { version = "0.12.2" } +cosmwasm-std = { version = "0.13.2" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] -cosmwasm-schema = { version = "0.12.2" } +cosmwasm-schema = { version = "0.13.2" } diff --git a/packages/multi-test/Cargo.toml b/packages/multi-test/Cargo.toml index a8ef845ed..97aeb64c6 100644 --- a/packages/multi-test/Cargo.toml +++ b/packages/multi-test/Cargo.toml @@ -16,6 +16,6 @@ iterator = ["cosmwasm-std/iterator"] [dependencies] cw0 = { path = "../../packages/cw0", version = "0.4.0" } -cosmwasm-std = { version = "0.12.2" } +cosmwasm-std = { version = "0.13.2" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/packages/storage-plus/Cargo.toml b/packages/storage-plus/Cargo.toml index 10d8cc8f6..e576da828 100644 --- a/packages/storage-plus/Cargo.toml +++ b/packages/storage-plus/Cargo.toml @@ -13,6 +13,6 @@ documentation = "https://docs.cosmwasm.com" iterator = ["cosmwasm-std/iterator"] [dependencies] -cosmwasm-std = { version = "0.12.2" } +cosmwasm-std = { version = "0.13.2" } schemars = "0.7" serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/packages/storage-plus/src/indexed_map.rs b/packages/storage-plus/src/indexed_map.rs index 7d08d0111..97cfc704e 100644 --- a/packages/storage-plus/src/indexed_map.rs +++ b/packages/storage-plus/src/indexed_map.rs @@ -54,12 +54,12 @@ where /// save will serialize the model and store, returns an error on serialization issues. /// this must load the old value to update the indexes properly /// if you loaded the old value earlier in the same function, use replace to avoid needless db reads - pub fn save(&mut self, store: &mut dyn Storage, key: K, data: &T) -> StdResult<()> { + pub fn save(&self, store: &mut dyn Storage, key: K, data: &T) -> StdResult<()> { let old_data = self.may_load(store, key.clone())?; self.replace(store, key, Some(data), old_data.as_ref()) } - pub fn remove(&mut self, store: &mut dyn Storage, key: K) -> StdResult<()> { + pub fn remove(&self, store: &mut dyn Storage, key: K) -> StdResult<()> { let old_data = self.may_load(store, key.clone())?; self.replace(store, key, None, old_data.as_ref()) } @@ -68,7 +68,7 @@ where /// and is used to properly update the index. This is used by save, replace, and update /// and can be called directly if you want to optimize pub fn replace( - &mut self, + &self, store: &mut dyn Storage, key: K, data: Option<&T>, @@ -96,7 +96,7 @@ where /// in the database. This is shorthand for some common sequences, which may be useful. /// /// If the data exists, `action(Some(value))` is called. Otherwise `action(None)` is called. - pub fn update(&mut self, store: &mut dyn Storage, key: K, action: A) -> Result + pub fn update(&self, store: &mut dyn Storage, key: K, action: A) -> Result where A: FnOnce(Option) -> Result, E: From, @@ -192,7 +192,7 @@ mod test { #[test] fn store_and_load_by_index() { let mut store = MockStorage::new(); - let mut map = build_map(); + let map = build_map(); // save data let data = Data { @@ -270,7 +270,7 @@ mod test { #[test] fn unique_index_enforced() { let mut store = MockStorage::new(); - let mut map = build_map(); + let map = build_map(); // first data let data1 = Data { @@ -325,7 +325,7 @@ mod test { #[test] fn remove_and_update_reflected_on_indexes() { let mut store = MockStorage::new(); - let mut map = build_map(); + let map = build_map(); let name_count = |map: &IndexedMap<&[u8], Data, DataIndexes>, store: &MemoryStorage, diff --git a/packages/storage-plus/src/item.rs b/packages/storage-plus/src/item.rs index 24da32ff7..9628aa252 100644 --- a/packages/storage-plus/src/item.rs +++ b/packages/storage-plus/src/item.rs @@ -61,7 +61,7 @@ where /// in the database. This is shorthand for some common sequences, which may be useful. /// /// If the data exists, `action(Some(value))` is called. Otherwise `action(None)` is called. - pub fn update(&mut self, store: &mut dyn Storage, action: A) -> Result + pub fn update(&self, store: &mut dyn Storage, action: A) -> Result where A: FnOnce(T) -> Result, E: From,