[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH v3 5/8] builder, v2v: Use imperative list functions to simplify curl arg code.



On Thursday 07 July 2016 17:30:04 Richard W.M. Jones wrote:
> -      let curl_args =
> -        curl_args @
> -          if verbose () then []
> -          else if progress_bar then [ "progress-bar", None ]
> -          else quiet_args in
> +      if verbose () then ()
> +      else if progress_bar then push curl_args ("progress-bar", None)
> +      else append curl_args quiet_args;

Hm this could be better as:

  if not (verbose ()) then (
     if progress_bar then push curl_args ("progress-bar", None)
     else append curl_args quiet_args;
  );

Thanks,
-- 
Pino Toscano

Attachment: signature.asc
Description: This is a digitally signed message part.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]