From 89827a35aa717cd60f5a2d2f3158a16cbf951866 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Tue, 21 Nov 2023 15:35:47 +0100 Subject: [PATCH] Remove `LineNumberNode`s from `at-assert` macro to help coverage. --- src/Prometheus.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Prometheus.jl b/src/Prometheus.jl index 3979537..f9e5698 100644 --- a/src/Prometheus.jl +++ b/src/Prometheus.jl @@ -25,9 +25,7 @@ unreachable() = throw(UnreachableError()) struct AssertionError <: PrometheusException end macro assert(cond) - return quote - $(esc(cond)) || throw(AssertionError()) - end + return :($(esc(cond)) || throw(AssertionError())) end function Base.showerror(io::IO, err::Union{AssertionError, UnreachableError})