aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorClombrong <cromblong@egregore.fun>2025-06-18 22:09:25 +0200
committerClombrong <cromblong@egregore.fun>2025-06-18 22:09:25 +0200
commitc90fe3ed3f35ea01b0d1299a0e721a5ab902ca11 (patch)
tree8d872f86d95cf887a2eb110a4ec697815ab42408 /lib
parentb039051748d023a004f2c8848a756b8fb67617b1 (diff)
style: change fill-column to 88
Diffstat (limited to 'lib')
-rw-r--r--lib/sasl.ml9
-rw-r--r--lib/stream.ml6
2 files changed, 10 insertions, 5 deletions
diff --git a/lib/sasl.ml b/lib/sasl.ml
index 8fbb8b2..c745aaa 100644
--- a/lib/sasl.ml
+++ b/lib/sasl.ml
@@ -29,12 +29,15 @@ let send_auth_stanza (stream, push) localpart pass mechanism =
| `Text t :: _ -> Some (String.concat "" t)
| _ -> None
and parse_descriptive_text = function
- | `Start_element ((_, "text"), [((_, "lang"), lang)]) :: `Text desc :: _ -> Some (lang, String.concat "" desc)
- | `Start_element ((_, "text"), []) :: `Text desc :: _ -> Some ("en", String.concat "" desc)
+ | `Start_element ((_, "text"), [((_, "lang"), lang)]) :: `Text desc :: _ ->
+ Some (lang, String.concat "" desc)
+ | `Start_element ((_, "text"), []) :: `Text desc :: _ ->
+ Some ("en", String.concat "" desc)
| _ -> None
in
let parse_error_stanza = function
- | `Start_element ((_, error), _) :: `End_element :: rest -> (parse_sasl_error error, parse_descriptive_text rest)
+ | `Start_element ((_, error), _) :: `End_element :: rest ->
+ (parse_sasl_error error, parse_descriptive_text rest)
| _ -> raise (InvalidStanza string_stanza)
in match stanza with
| `Start_element ((_, "success"), _) :: rest -> Ok (parse_additional_info rest)
diff --git a/lib/stream.ml b/lib/stream.ml
index adf852c..1363352 100644
--- a/lib/stream.ml
+++ b/lib/stream.ml
@@ -9,7 +9,8 @@ type auth_mechanism =
| Unknown of string [@@deriving show { with_path = false }]
let get (stream : (signal, async) stream) : (signal, sync) stream Lwt.t =
- (** [stanza stream] is a promise containing a full stanza of the fragments of [stream].*)
+ (** [stanza stream] is a promise containing a full stanza of the fragments of
+ [stream]. *)
let traverse_stanza depth fragment =
let depth = match fragment with
@@ -20,7 +21,8 @@ let get (stream : (signal, async) stream) : (signal, sync) stream Lwt.t =
in transform traverse_stanza 0 stream |> Markup_lwt.load
let start domain : Portal.t Lwt.t =
- (** [start domain] is a promise containing a Portal (stream * push) connected to the XMPP server [domain].
+ (** [start domain] is a promise containing a Portal (stream * push) connected to the
+ XMPP server [domain].
Currently, it doesn't handle anything except the initial [<open/>] stanza. *)
let* stream, _push = Portal.connect domain