Skip to content

Commit

Permalink
compact arguments_isequal
Browse files Browse the repository at this point in the history
  • Loading branch information
ogauthe committed Oct 24, 2024
1 parent 8fe5b03 commit 0ca9ffc
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions NDTensors/src/lib/SymmetrySectors/src/sector_product.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,8 @@ end
# get clean results when mixing implementations
arguments_isequal(nt::NamedTuple, t::Tuple) = arguments_isequal(t, nt)
function arguments_isequal(t::Tuple, nt::NamedTuple)
if isempty(t)
return arguments_isequal((;), nt)
elseif isempty(nt)
return arguments_isequal(t, ())
end
isempty(t) && return arguments_isequal((;), nt)
isempty(nt) && return arguments_isequal(t, ())
return false
end

Expand Down

0 comments on commit 0ca9ffc

Please sign in to comment.