Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Readability / style changes

Co-authored-by: Dmitrii Kovanikov <[email protected]>
  • Loading branch information
heathhenley and chshersh authored Jan 22, 2025
1 parent 5031e30 commit 31815e9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/fs/fs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ let zipper_parents zipper =
(* TODO: Horrible hardcoding of maximum lines view *)
let span = 40

let move_cursor move_dir_cursor move_file_cursor cursor =
match cursor with
let move_cursor move_dir_cursor move_file_cursor = function
| Dir_cursor cursor -> Dir_cursor (move_dir_cursor cursor)
| File_cursor cursor -> File_cursor (move_file_cursor cursor)

Expand All @@ -92,8 +91,8 @@ let go_move move zipper =
let new_cursor = move_cursor move_dir move_file old in
{ zipper with current = new_cursor }

let go_down zipper = go_move 1 zipper
let go_up zipper = go_move (-1) zipper
let go_down = go_move 1
let go_up = go_move (-1)

let go_next zipper =
match zipper.current with
Expand Down

0 comments on commit 31815e9

Please sign in to comment.