Skip to content

Commit

Permalink
firebasey tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Jan 20, 2025
1 parent b64cdc7 commit 3f17def
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
24 changes: 18 additions & 6 deletions src/webserver/Firebasey.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### A Pluto.jl notebook ###
# v0.19.12
# v0.20.4

using Markdown
using InteractiveUtils
Expand Down Expand Up @@ -139,19 +139,19 @@ md"### =="
╠═║ =#

# ╔═║ 732fd744-acdb-4507-b1de-6866ec5563dd
Base.hash(a::AddPatch) = hash([AddPatch, a.value, a.path])
Base.hash(a::AddPatch, h::UInt) = hash((AddPatch, a.value, a.path), h)

# ╔═║ 17606cf6-2d0f-4245-89a3-746ad818a664
Base.hash(a::RemovePatch) = hash([RemovePatch, a.path])
Base.hash(a::RemovePatch, h::UInt) = hash((RemovePatch, a.path), h)

# ╔═║ c7ac7d27-7bf9-4209-8f3c-e4d52c543e29
Base.hash(a::ReplacePatch) = hash([ReplacePatch, a.value, a.path])
Base.hash(a::ReplacePatch, h::UInt) = hash((ReplacePatch, a.value, a.path), h)

# ╔═║ 042f7788-e996-430e-886d-ffb4f70dea9e
Base.hash(a::CopyPatch) = hash([CopyPatch, a.from, a.path])
Base.hash(a::CopyPatch, h::UInt) = hash((CopyPatch, a.from, a.path), h)

# ╔═║ 9d2dde5c-d404-4fbc-b8e0-5024303c8052
Base.hash(a::MovePatch) = hash([MovePatch, a.from, a.path])
Base.hash(a::MovePatch, h::UInt) = hash((MovePatch, a.from, a.path), h)

# ╔═║ f649f67c-aab0-4d35-a799-f398e5f3ecc4
function Base.:(==)(a::AddPatch, b::AddPatch)
Expand Down Expand Up @@ -1036,6 +1036,16 @@ macro track(expr)
end
╠═║ =#

# ╔═║ db99e5c9-d8cd-4314-90e2-99976e81283d
#=╠═║
@track example_patches[1] == example_patches[2]
╠═║ =#

# ╔═║ 2b342873-916c-4efb-b62c-b46a96bd6a2d
#=╠═║
@track example_patches[2] == example_patches[2]
╠═║ =#

# ╔═║ 7b8ab89b-bf56-4ddf-b220-b4881f4a2050
#=╠═║
@track Base.convert(JSONPatch, convert(Dict, add_patch)) == add_patch
Expand Down Expand Up @@ -1147,6 +1157,8 @@ end
# ╠═aa81974a-7254-45e0-9bfe-840c4793147f
# ╠═31188a03-76ba-40cf-a333-4d339ce37711
# ╠═7524a9e8-1a6d-4851-b50e-19415f25a84b
# β•Ÿβ”€db99e5c9-d8cd-4314-90e2-99976e81283d
# β•Ÿβ”€2b342873-916c-4efb-b62c-b46a96bd6a2d
# β•Ÿβ”€5ddfd616-db20-451b-bc1e-2ad52e0e2777
# β•Ÿβ”€24e93923-eab9-4a7b-9bc7-8d8a1209a78f
# β•Ÿβ”€09ddf4d9-5ccb-4530-bfab-d11b864e872a
Expand Down
6 changes: 5 additions & 1 deletion src/webserver/FirebaseyUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ begin
(String(name) => getfield(a, name), i + 1)
end
end

function Base.show(io::IO, t::ImmutableMarker)
print(io, typeof(t), "(")
show(io, t.source)
print(io, ")")
end
end

# ╔═║ 55975e53-f70f-4b70-96d2-b144f74e7cde
Expand Down

0 comments on commit 3f17def

Please sign in to comment.