Browse Source

Treat all cases in list subcommand

 + There was a warning due to incomplete match case.
Leo 9 years ago
parent
commit
d4accf3e35
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/list_rc.ml

+ 4 - 0
src/list_rc.ml

@@ -80,6 +80,8 @@ let generate_list ?rc ?elength log =
                  |> List.mapi ~f:(fun i item -> ( item, i ))
   in
   List.map log ~f:(function ( cmd, number ) ->
+    (* We are using list instead of tuple since it is what Text_utils want as
+     * input. *)
     [
       (List.Assoc.find_exn rc_numbered cmd |> Int.to_string);
       (* Limit length, to get better display with long command. A default
@@ -92,6 +94,8 @@ let generate_list ?rc ?elength log =
      match entry1, entry2 with
      | [ id1; _; _ ], [ id2; _; _ ] ->
          Int.(compare (int_of_string id1) (int_of_string id2))
+     (* Considering the transformation performed, nothing else is possible. *)
+     | _ -> assert false
      )
 ;;