From f48cc19fc4e96e34c07b70af7a31f5acec5c22f3 Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Mon, 4 Nov 2024 16:46:01 +0100 Subject: [PATCH] drop superfluous 'unknown' --- mirage/unikernel.ml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/mirage/unikernel.ml b/mirage/unikernel.ml index 8df6922..ab0a774 100644 --- a/mirage/unikernel.ml +++ b/mirage/unikernel.ml @@ -163,23 +163,16 @@ module Make let active_downloads = ref SM.empty let add_to_active url ts = - active_downloads := SM.add url (ts, 0, "unknown size") !active_downloads + active_downloads := SM.add url (ts, 0) !active_downloads let remove_active url = active_downloads := SM.remove url !active_downloads - let active_length url written length = - match SM.find_opt url !active_downloads with - | None -> () - | Some (ts, written', _) -> - active_downloads := SM.add url (ts, written + written', length) - !active_downloads - let active_add_bytes url written = match SM.find_opt url !active_downloads with | None -> () - | Some (ts, written', l) -> - active_downloads := SM.add url (ts, written + written', l) + | Some (ts, written') -> + active_downloads := SM.add url (ts, written + written') !active_downloads let failed_downloads = ref SM.empty @@ -628,8 +621,8 @@ stamp: %S let active_downloads = let header = "

Active downloads