Skip to content

Commit c009bcc

Browse files
committed
get rid of try-catch block
1 parent f548497 commit c009bcc

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/spaces/vectorspaces.jl

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -214,17 +214,8 @@ function isunitspace(V::ElementarySpace)
214214
return if isa(UnitStyle(I), SimpleUnit)
215215
isisomorphic(V, unitspace(V))
216216
else
217-
try
218-
isisomorphic(V, unitspace(V)) ||
219-
isisomorphic(V, leftunitspace(V)) ||
220-
isisomorphic(V, rightunitspace(V))
221-
catch e
222-
if isa(e, ArgumentError)
223-
return false
224-
else
225-
rethrow(e)
226-
end
227-
end
217+
(dim(V) == 0 || !all(isunit, sectors(V))) && return false
218+
return true
228219
end
229220
end
230221

0 commit comments

Comments
 (0)