aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2024-03-26 00:18:37 +0000
committerHayleigh Thompson <me@hayleigh.dev>2024-03-26 00:18:37 +0000
commit730860dee703fddf09c1e7c95b351f85cf4fb96c (patch)
tree7955ac1ca9fb9acb7d1c142ec6fc65bd5aa188df
parent4ea9308fb3107fa8b4c06fede0acafa7aa6428aa (diff)
downloadlustre-730860dee703fddf09c1e7c95b351f85cf4fb96c.tar.gz
lustre-730860dee703fddf09c1e7c95b351f85cf4fb96c.zip
:art: Make sure everything is formatted correctly.
-rw-r--r--src/lustre/internals/constants.gleam10
-rw-r--r--src/lustre/internals/patch.gleam18
2 files changed, 14 insertions, 14 deletions
diff --git a/src/lustre/internals/constants.gleam b/src/lustre/internals/constants.gleam
index a51a200..b1cdfee 100644
--- a/src/lustre/internals/constants.gleam
+++ b/src/lustre/internals/constants.gleam
@@ -6,21 +6,21 @@
// that tells us how to interpret the rest of the array.
/// Represents the `Diff` variant of the `Patch` type.
-///
+///
pub const diff: Int = 0
/// Represents the `Emit` variant of the `Patch` type.
-///
+///
pub const emit: Int = 1
/// Represents the `Init` variant of the `Patch` type.
-///
+///
pub const init: Int = 2
/// Represents the `Event` variant of the `Action` type.
-///
+///
pub const event: Int = 4
/// Represents the `Attr` variant of the `Patch` type.
-///
+///
pub const attrs: Int = 5
diff --git a/src/lustre/internals/patch.gleam b/src/lustre/internals/patch.gleam
index b93a9a6..86d05bc 100644
--- a/src/lustre/internals/patch.gleam
+++ b/src/lustre/internals/patch.gleam
@@ -97,13 +97,13 @@ 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 -> {
+ 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(
@@ -301,8 +301,8 @@ fn attribute_dict(
let classes =
dynamic.from(
dynamic.unsafe_coerce(classes)
- <> " "
- <> dynamic.unsafe_coerce(value),
+ <> " "
+ <> dynamic.unsafe_coerce(value),
)
dict.insert(dict, "class", Attribute("class", classes, False))
}