From 49e84163ff0bf8b57361235d04f2a963f7140c76 Mon Sep 17 00:00:00 2001 From: Stefan Krastanov Date: Sat, 23 Nov 2024 15:13:35 -0500 Subject: [PATCH 1/2] remove undef variable detected by JET --- src/resources/containers.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/resources/containers.jl b/src/resources/containers.jl index 9bd0196..e31f147 100755 --- a/src/resources/containers.jl +++ b/src/resources/containers.jl @@ -32,11 +32,11 @@ mutable struct Container{N<:Real, T<:Number} <: AbstractResource end end -function Container(env::Environment, capacity::N=one(N); level=zero(N)) where {N<:Real} +function Container(env::Environment, capacity::N; level=zero(N)) where {N<:Real} Container{N, Int}(env, capacity; level=N(level)) end -function Container{T}(env::Environment, capacity::N=one(N); level=zero(N)) where {N<:Real, T<:Number} +function Container{T}(env::Environment, capacity::N; level=zero(N)) where {N<:Real, T<:Number} Container{N, T}(env, capacity; level=N(level)) end From 151cc4db1abc78dbdf41a12bb90588d004e0849a Mon Sep 17 00:00:00 2001 From: Stefan Krastanov Date: Sat, 23 Nov 2024 15:20:17 -0500 Subject: [PATCH 2/2] upper bound JET errors --- test/test_jet.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_jet.jl b/test/test_jet.jl index b8841ac..b9d0b78 100644 --- a/test/test_jet.jl +++ b/test/test_jet.jl @@ -12,5 +12,5 @@ using InteractiveUtils ) @show rep @test_broken length(JET.get_reports(rep)) == 0 - @test length(JET.get_reports(rep)) <= 3 + @test length(JET.get_reports(rep)) <= 1 end