Commit
+5 -5 +/-4 browse
1 | diff --git a/bin/note.ml b/bin/note.ml |
2 | index 6ecd58e..9fd3102 100644 |
3 | --- a/bin/note.ml |
4 | +++ b/bin/note.ml |
5 | @@ -267,7 +267,7 @@ let version = |
6 | | None -> "n/a" |
7 | | Some v -> Build_info.V1.Version.to_string v |
8 | |
9 | - let run = |
10 | + let _ = |
11 | Command_unix.run ~version ~build_info:"" |
12 | (Command.group ~summary:"Note is a simple CLI based note taking application" |
13 | [ |
14 | diff --git a/lib/note.ml b/lib/note.ml |
15 | index c269e96..852883e 100644 |
16 | --- a/lib/note.ml |
17 | +++ b/lib/note.ml |
18 | @@ -67,7 +67,7 @@ let extract_structured_data content = |
19 | in |
20 | let get_data ~values doc = |
21 | match doc with |
22 | - | Omd.Code_block (kind, content) -> of_codeblock kind content @ values |
23 | + | Omd.Code_block (_, kind, content) -> of_codeblock kind content @ values |
24 | | _ -> values |
25 | in |
26 | let doc = content |> Omd.of_string in |
27 | diff --git a/lib/slug.ml b/lib/slug.ml |
28 | index a05ab1a..ca61d4f 100644 |
29 | --- a/lib/slug.ml |
30 | +++ b/lib/slug.ml |
31 | @@ -42,7 +42,7 @@ let load state_dir = |
32 | |> List.map ~f:of_string |
33 | |
34 | let next ?(last = None) state_dir = |
35 | - let today = Time.now () |> Time.to_date ~zone:Time.Zone.utc in |
36 | + let today = Time_float_unix.now () |> Time_float_unix.to_date ~zone:Time_float_unix.Zone.utc in |
37 | let today_str = Date_unix.format today "%Y%m%d" in |
38 | match last with |
39 | | Some last -> |
40 | diff --git a/test/slug_test.ml b/test/slug_test.ml |
41 | index 78a71ff..c38e56d 100644 |
42 | --- a/test/slug_test.ml |
43 | +++ b/test/slug_test.ml |
44 | @@ -21,7 +21,7 @@ let test_slug_comparable () = |
45 | Alcotest.(check bool) "identical paths" true (Slug.compare s1 s2 = 0) |
46 | |
47 | let test_slug_path () = |
48 | - let date_string = Time_unix.format (Time.now ()) "%Y%m%d" ~zone:Time.Zone.utc in |
49 | + let date_string = Time_float_unix.format (Time_float_unix.now ()) "%Y%m%d" ~zone:Time_float_unix.Zone.utc in |
50 | let state_dir = Filename_unix.temp_dir "note-test" "" in |
51 | let slug = Slug.next state_dir in |
52 | let expected = |
53 | @@ -30,7 +30,7 @@ let test_slug_path () = |
54 | Alcotest.(check string) "path" expected slug.path |
55 | |
56 | let test_slug_increment () = |
57 | - let date_string = Time_unix.format (Time.now ()) "%Y%m%d" ~zone:Time.Zone.utc in |
58 | + let date_string = Time_float_unix.format (Time_float_unix.now ()) "%Y%m%d" ~zone:Time_float_unix.Zone.utc in |
59 | let slug = Slug.next "/fuu/bar" in |
60 | let expected = sprintf "/fuu/bar/note-%s-%d.md" date_string 0 in |
61 | Alcotest.(check string) "check path" expected (slug |> Slug.to_string); |