Bug fix: Hashtbl.filter_map_inplace did not correctly update the size field.

master
Alain Frisch 2016-03-10 14:42:36 +01:00
parent 0310ff4415
commit af09eacaf2
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ let filter_map_inplace f h =
Empty
| Cons(k, d, rest) ->
match f k d with
| None -> do_bucket rest
| None -> h.size <- h.size - 1; do_bucket rest
| Some new_d -> Cons(k, new_d, do_bucket rest)
in
let d = h.data in