mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
common/mlstdutils: Drop our implementations of functions now in OCaml 4.01.
We reimplemented some functions which can now be found in the OCaml stdlib since 4.01 (or earlier). The functions I have dropped are: - String.map - |> - iteri (replaced by List.iteri) - mapi (replaced by List.mapi) Note that our definition of iteri was slightly wrong: the type of the function parameter was too wide, allowing (int -> 'a -> 'b) instead of (int -> 'a -> unit). I also added this new function to the Std_utils.String module as an export from stdlib String: - String.iteri Thanks: Pino Toscano
This commit is contained in:
@@ -1165,7 +1165,7 @@ $VG guestfish \\
|
||||
|
||||
let vg_count = ref 0 in
|
||||
|
||||
iteri (
|
||||
List.iteri (
|
||||
fun i (name, _, _, _) ->
|
||||
let params = [name] in
|
||||
let params =
|
||||
|
||||
Reference in New Issue
Block a user