Skip to content

Commit

Permalink
unsafe-array-operations: Use unsafe array operations in deque
Browse files Browse the repository at this point in the history
Bounds are already being checked so...
  • Loading branch information
seliopou committed Jun 11, 2017
1 parent 9847742 commit 4d9a43b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/faraday.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 4d9a43b

Please sign in to comment.