aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlban Gruin2020-09-12 12:05:42 +0200
committerAlban Gruin2020-09-12 12:05:42 +0200
commit216d0af10e49bd74a66aaad34475c5ef525e09b7 (patch)
treeda04f2ae42a444c423b5abce5722fe418f879b9a /src
parentb6506d308a3b3e3bf585d3a5a79f58a766244bf5 (diff)
Remove unused functions and useless type specifications
Signed-off-by: Alban Gruin <alban at pa1ch dot fr>
Diffstat (limited to 'src')
-rw-r--r--src/course.ml10
-rw-r--r--src/ics.ml2
-rw-r--r--src/ucs.ml2
3 files changed, 6 insertions, 8 deletions
diff --git a/src/course.ml b/src/course.ml
index 9f16646..df5a27a 100644
--- a/src/course.ml
+++ b/src/course.ml
@@ -44,13 +44,13 @@ let location_and_summary str category =
List.fold_right
(fun str (has_groups, location, summary) ->
if not has_groups then
- (check_groups str, "", "")
+ check_groups str, "", ""
else if location = "" then
- (true, str, "")
+ true, str, ""
else if summary = "" then
- (true, str, location)
+ true, str, location
else
- (true, location, summary)) parts (false, "", "") in
+ true, location, summary) parts (false, "", "") in
if summary = "" then
location, category
else
@@ -98,5 +98,5 @@ let decode s =
| "" -> `O []
| s -> Ezjsonm.from_string s in
J.(destruct (list encoding) toks)
- |> List.filter_map (fun (event: Ics.Event.t option) -> event)
+ |> List.filter_map (fun event -> event)
|> Ics.make
diff --git a/src/ics.ml b/src/ics.ml
index bf895b0..9dc2be6 100644
--- a/src/ics.ml
+++ b/src/ics.ml
@@ -59,7 +59,7 @@ end
type t = Event.t list
-let make (events: t) = events
+let make events = events
let to_string events =
let date = current_date () in
diff --git a/src/ucs.ml b/src/ucs.ml
index 55a246c..b4e0952 100644
--- a/src/ucs.ml
+++ b/src/ucs.ml
@@ -30,8 +30,6 @@ let body =
>>= fun (_resp, body) ->
Cohttp_lwt.Body.to_string body
-let dump_date = CalendarLib.Printer.Calendar.to_string
-
let () =
Lwt_main.run body
|> Course.decode