From 4d9a43b0bd4f04e60f5c4ee21f4b12dc2094373f Mon Sep 17 00:00:00 2001 From: Spiros Eliopoulos Date: Sun, 11 Jun 2017 13:45:36 +0000 Subject: [PATCH] unsafe-array-operations: Use unsafe array operations in deque Bounds are already being checked so... --- lib/faraday.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/faraday.ml b/lib/faraday.ml index f81a805..2ef3a86 100644 --- a/lib/faraday.ml +++ b/lib/faraday.ml @@ -104,8 +104,8 @@ end = struct if is_empty t then raise Not_found else - let result = t.elements.(t.front) in - t.elements.(t.front) <- sentinel; + let result = Array.unsafe_get t.elements t.front in + Array.unsafe_set t.elements t.front sentinel; t.front <- t.front + 1; result