From 3683e948c14af5e407da784d675e3f46b0430989 Mon Sep 17 00:00:00 2001 From: Pietro Date: Tue, 13 Mar 2018 15:36:16 +0100 Subject: [PATCH] Ring: swap operation order in Ring.Maketable.add --- src/lib_stdlib/ring.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib_stdlib/ring.ml b/src/lib_stdlib/ring.ml index 2bf3c5e01..d87e9cb05 100644 --- a/src/lib_stdlib/ring.ml +++ b/src/lib_stdlib/ring.ml @@ -111,10 +111,10 @@ module MakeTable (V: Hashtbl.HashedType) = struct table = Table.create size } let add {contents = t } v = - Table.add t.table v (); Option.iter (Ring.add_and_return_erased t.ring v) - ~f:(Table.remove t.table) + ~f:(Table.remove t.table); + Table.add t.table v () let mem {contents = t} v = Table.mem t.table v