Skip to content

Commit

Permalink
Remove trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Taaitaaiger committed Jul 26, 2023
1 parent 2013fe3 commit 9b360ea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
12 changes: 6 additions & 6 deletions src/Reflect.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion test/ZeroSized.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> {
Expand Down

0 comments on commit 9b360ea

Please sign in to comment.