Parcourir la source

Clean up code

 - Forgotten to remove peace of Yojson code in last commit
Leo il y a 10 ans
Parent
commit
455dbd5d06
1 fichiers modifiés avec 2 ajouts et 4 suppressions
  1. 2 4
      src/exec_cmd.ml

+ 2 - 4
src/exec_cmd.ml

@@ -56,12 +56,10 @@ let num_cmd_to_cmd ~cmd_list number =
 ;;
 
 (* Function to determinate what is the next command to
- * execute *)
+ * execute. It take the current number from tmp file. *)
 let what_next ~cmd_list =
   let tmp_file = Tmp_file.read () in
-  let open Yojson.Basic.Util in
-    let num_next = Tmp_file.read () in (* Number of the next cmd to run *)
-    num_cmd_to_cmd ~cmd_list:cmd_list num_next.number
+  num_cmd_to_cmd ~cmd_list:cmd_list tmp_file.number
   ;;
 
 (* Display an error message if command can't run