diff options
author | Son Ho | 2023-12-23 00:59:55 +0100 |
---|---|---|
committer | Son Ho | 2023-12-23 00:59:55 +0100 |
commit | a4decc7654bc6f3301c0174124d21fdbc2dbc708 (patch) | |
tree | f992f3bb64609bf12d033a1424873a8134c66617 /tests/lean/Hashmap | |
parent | ff9fe8aa1e13a7297f7c4f2c2554235361db038f (diff) |
Regenerate the files
Diffstat (limited to '')
-rw-r--r-- | tests/lean/Hashmap/Funs.lean | 9 | ||||
-rw-r--r-- | tests/lean/HashmapMain/Funs.lean | 11 |
2 files changed, 8 insertions, 12 deletions
diff --git a/tests/lean/Hashmap/Funs.lean b/tests/lean/Hashmap/Funs.lean index 32ed2b33..3978bfc7 100644 --- a/tests/lean/Hashmap/Funs.lean +++ b/tests/lean/Hashmap/Funs.lean @@ -41,8 +41,7 @@ def HashMap.new_with_capacity Result (HashMap T) := do - let v := alloc.vec.Vec.new (List T) - let slots ← HashMap.allocate_slots T v capacity + let slots ← HashMap.allocate_slots T (alloc.vec.Vec.new (List T)) capacity let i ← capacity * max_load_dividend let i1 ← i / max_load_divisor Result.ret @@ -102,8 +101,7 @@ divergent def HashMap.insert_in_list_loop do let (b, back) ← HashMap.insert_in_list_loop T key value tl Result.ret (b, List.Cons ckey cvalue back) - | List.Nil => let l := List.Nil - Result.ret (true, List.Cons key value l) + | List.Nil => Result.ret (true, List.Cons key value List.Nil) /- [hashmap::{hashmap::HashMap<T>}::insert_in_list]: Source: 'src/hashmap.rs', lines 97:4-97:71 -/ @@ -315,8 +313,7 @@ def HashMap.get_mut_in_list := do let (t, back_'a) ← HashMap.get_mut_in_list_loop T ls key - let back_'a1 := fun ret => back_'a ret - Result.ret (t, back_'a1) + Result.ret (t, back_'a) /- [hashmap::{hashmap::HashMap<T>}::get_mut]: Source: 'src/hashmap.rs', lines 257:4-257:67 -/ diff --git a/tests/lean/HashmapMain/Funs.lean b/tests/lean/HashmapMain/Funs.lean index 9bfb5070..ebed2570 100644 --- a/tests/lean/HashmapMain/Funs.lean +++ b/tests/lean/HashmapMain/Funs.lean @@ -42,8 +42,9 @@ def hashmap.HashMap.new_with_capacity Result (hashmap.HashMap T) := do - let v := alloc.vec.Vec.new (hashmap.List T) - let slots ← hashmap.HashMap.allocate_slots T v capacity + let slots ← + hashmap.HashMap.allocate_slots T (alloc.vec.Vec.new (hashmap.List T)) + capacity let i ← capacity * max_load_dividend let i1 ← i / max_load_divisor Result.ret @@ -105,8 +106,7 @@ divergent def hashmap.HashMap.insert_in_list_loop let (b, back) ← hashmap.HashMap.insert_in_list_loop T key value tl Result.ret (b, hashmap.List.Cons ckey cvalue back) | hashmap.List.Nil => - let l := hashmap.List.Nil - Result.ret (true, hashmap.List.Cons key value l) + Result.ret (true, hashmap.List.Cons key value hashmap.List.Nil) /- [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::insert_in_list]: Source: 'src/hashmap.rs', lines 97:4-97:71 -/ @@ -328,8 +328,7 @@ def hashmap.HashMap.get_mut_in_list := do let (t, back_'a) ← hashmap.HashMap.get_mut_in_list_loop T ls key - let back_'a1 := fun ret => back_'a ret - Result.ret (t, back_'a1) + Result.ret (t, back_'a) /- [hashmap_main::hashmap::{hashmap_main::hashmap::HashMap<T>}::get_mut]: Source: 'src/hashmap.rs', lines 257:4-257:67 -/ |