From d5ffa122db886f8c13e9238dd1622615627ae046 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Sat, 27 Jan 2024 23:30:48 -0800 Subject: [PATCH] Adjust formatting a bit --- src/helpers.ml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/helpers.ml b/src/helpers.ml index d870fcb8..00076b35 100644 --- a/src/helpers.ml +++ b/src/helpers.ml @@ -154,18 +154,13 @@ let download_cps ~uri ~with_file = | Some new_uri -> inner_download new_uri | None -> - let msg = - Printf.sprintf "Redirected from %s, but no Location header found" - (Uri.to_string uri) - in - Lwt.return_error msg ) - | status_code -> - let msg = - Printf.sprintf "HTTP request to %s failed with status code: %s" + f "Redirected from %s, but no Location header found" (Uri.to_string uri) - (Code.string_of_status status_code) - in - Lwt.return_error msg + |> Lwt.return_error ) + | status_code -> + f "HTTP request to %s failed with status code: %s" (Uri.to_string uri) + (Code.string_of_status status_code) + |> Lwt.return_error in inner_download uri