From 9b360ea06b5f97a5c2bacf3f4c494534edcb30bd Mon Sep 17 00:00:00 2001 From: Thomas van Doornmalen Date: Wed, 26 Jul 2023 20:13:06 +0200 Subject: [PATCH] Remove trailing whitespace --- CHANGELOG.md | 2 +- src/Reflect.jl | 12 ++++++------ test/ZeroSized.jl | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b531398..e1b732a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,4 +15,4 @@ - Upgrade JlrsLedger to v0.1.0 -- `Ledger.LEDGER_API_VERSION` is now 2: `Ledger.PoisonError` has been removed, and `Ledger.unborrow_shared` returns `true` if there are no remaining shared borrows or `false` otherwise. +- `Ledger.LEDGER_API_VERSION` is now 2: `Ledger.PoisonError` has been removed, and `Ledger.unborrow_shared` returns `true` if there are no remaining shared borrows or `false` otherwise. diff --git a/src/Reflect.jl b/src/Reflect.jl index 8094f28..2f02a08 100644 --- a/src/Reflect.jl +++ b/src/Reflect.jl @@ -556,7 +556,7 @@ function isnonparametric(type::Union)::Bool end function is_pointer_free_type(ty, env) - if !isdefined(ty, :types) + if !isdefined(ty, :types) return true end @@ -572,7 +572,7 @@ function is_pointer_free_type(ty, env) end end elseif ty isa Union - return false + return false elseif ty isa UnionAll ty2 = ty while ty2 isa UnionAll @@ -1279,21 +1279,21 @@ function strlayout(layout::StructLayout, layouts::Dict{Type,Layout})::Union{Noth end push!(parts, "}") - if !is_constructible + if !is_constructible # A separate type constructor is needed due to the presence of elided parameters. elided_param_names = map(filter(layout.typeparams) do x x.elide end) do x string(x.name) end - if isempty(elided_param_names) + if isempty(elided_param_names) elided_param_names = "[]" end unelided_param_names = map(filter(layout.typeparams) do x !x.elide end) do x string(x.name) end - if isempty(unelided_param_names) + if isempty(unelided_param_names) unelided_param_names = "[]" end param_names = map(param -> string(param.name), layout.typeparams) - if isempty(param_names) + if isempty(param_names) param_names = "[]" end diff --git a/test/ZeroSized.jl b/test/ZeroSized.jl index 2cbffe7..13514e1 100644 --- a/test/ZeroSized.jl +++ b/test/ZeroSized.jl @@ -25,7 +25,7 @@ end #[jlrs(julia_type = "Main.TypedEmpty")] pub struct TypedEmpty { } - + #[derive(ConstructType, HasLayout)] #[jlrs(julia_type = "Main.TypedEmpty", constructor_for = "TypedEmpty", scope_lifetime = false, data_lifetime = false, layout_params = [], elided_params = ["T"], all_params = ["T"])] pub struct TypedEmptyTypeConstructor {