From 05e49a27e7b7ed08a781c001edcd3ceb3ed13ab1 Mon Sep 17 00:00:00 2001 From: rymdhund <7973243+rymdhund@users.noreply.github.com> Date: Mon, 29 Apr 2019 07:31:46 +0000 Subject: [PATCH] Remove unused reference --- AUTHORS.adoc | 1 + src/core/CCIO.ml | 11 ++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/AUTHORS.adoc b/AUTHORS.adoc index 21969b62..6482ea09 100644 --- a/AUTHORS.adoc +++ b/AUTHORS.adoc @@ -34,3 +34,4 @@ - Francois Berenger (@UnixJunkie) - Hongchang Wu (@hongchangwu) - Nathan Rebours (@NathanReb) +- @rymdhund diff --git a/src/core/CCIO.ml b/src/core/CCIO.ml index f48cd127..0e6aecc3 100644 --- a/src/core/CCIO.ml +++ b/src/core/CCIO.ml @@ -67,14 +67,11 @@ let with_in ?(mode=0o644) ?(flags=[Open_text]) filename f = let read_chunks ?(size=1024) ic = let buf = Bytes.create size in - let eof = ref false in let next() = - if !eof then None - else - let n = input ic buf 0 size in - if n = 0 - then None - else Some (Bytes.sub_string buf 0 n) + let n = input ic buf 0 size in + if n = 0 + then None + else Some (Bytes.sub_string buf 0 n) in next