Skip to content

Commit

Permalink
🤦
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
ggwpez committed Jun 5, 2024
1 parent 5767a6c commit 4c035b8
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions substrate/frame/support/src/storage/generator/double_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,35 +511,13 @@ where
mod test_iterators {
use crate::{
hash::StorageHasher,
pallet_prelude::ValueQuery,
storage::{
generator::{tests::*, StorageDoubleMap},
unhashed,
},
};
use codec::Encode;

#[test]
fn mutate_return_none_still_modifies() {
sp_io::TestExternalities::default().execute_with(|| {
use crate::hash::Identity;
#[crate::storage_alias]
type MyDoubleMap =
StorageDoubleMap<MyModule, Identity, u64, Identity, u64, u64, ValueQuery>;

// Insert one value
MyDoubleMap::insert(1, 1, 2);

MyDoubleMap::try_mutate(1, 1, |v| {
assert_eq!(*v, 2);
*v = 3;
Err::<u64, ()>(())
});

assert_eq!(MyDoubleMap::get(1, 1), 2);
});
}

#[test]
fn double_map_iter_from() {
sp_io::TestExternalities::default().execute_with(|| {
Expand Down

0 comments on commit 4c035b8

Please sign in to comment.