From 1a31a7773c6eedf6f52e5215765138bc49fd1323 Mon Sep 17 00:00:00 2001 From: Hayleigh Thompson Date: Wed, 29 May 2024 13:14:14 +0200 Subject: :art: Reformat for Gleam v1.2.0 --- src/lustre/attribute.gleam | 10 +++++----- src/lustre/internals/patch.gleam | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/lustre/attribute.gleam b/src/lustre/attribute.gleam index 693e538..d8f1cc3 100644 --- a/src/lustre/attribute.gleam +++ b/src/lustre/attribute.gleam @@ -95,11 +95,11 @@ pub fn classes(names: List(#(String, Bool))) -> Attribute(msg) { "class", names |> list.filter_map(fn(class) { - case class.1 { - True -> Ok(class.0) - False -> Error(Nil) - } - }) + case class.1 { + True -> Ok(class.0) + False -> Error(Nil) + } + }) |> string.join(" "), ) } diff --git a/src/lustre/internals/patch.gleam b/src/lustre/internals/patch.gleam index 3e87b81..a83d8ae 100644 --- a/src/lustre/internals/patch.gleam +++ b/src/lustre/internals/patch.gleam @@ -98,9 +98,9 @@ fn do_elements( // the case, we can dif their attributes to see what (if anything) has // changed, and then recursively diff their children. Element(_, old_ns, old_tag, old_attrs, old_children, _, _), - Element(_, new_ns, new_tag, new_attrs, new_children, _, _) if old_ns - == new_ns - && old_tag == new_tag -> { + Element(_, new_ns, new_tag, new_attrs, new_children, _, _) + if old_ns == new_ns && old_tag == new_tag + -> { let attribute_diff = attributes(old_attrs, new_attrs) let handlers = { use handlers, name, handler <- dict.fold( -- cgit v1.2.3