aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2024-05-29 13:14:14 +0200
committerHayleigh Thompson <me@hayleigh.dev>2024-05-30 19:18:05 +0200
commit1a31a7773c6eedf6f52e5215765138bc49fd1323 (patch)
tree6e09f55feac8d9083579bbdae4282fa6376b28e8
parentb31cc090647a4ca3510aef4943af03bb40727fff (diff)
downloadlustre-1a31a7773c6eedf6f52e5215765138bc49fd1323.tar.gz
lustre-1a31a7773c6eedf6f52e5215765138bc49fd1323.zip
:art: Reformat for Gleam v1.2.0
-rw-r--r--src/lustre/attribute.gleam10
-rw-r--r--src/lustre/internals/patch.gleam6
2 files changed, 8 insertions, 8 deletions
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(