Skip to content

Commit b68a8a6

Browse files
committed
One line inner constructor.
1 parent e679776 commit b68a8a6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/static.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ A statically sized `Int`.
44
Use `Static(N)` instead of `Val(N)` when you want it to behave like a number.
55
"""
66
struct Static{N} <: Integer
7-
function Static{N}() where {N}
8-
return new{N::Int}()
9-
end
7+
Static{N}() where {N} = new{N::Int}()
108
end
119
Base.@pure Static(N::Int) = Static{N}()
1210
Static(N) = Static(convert(Int, N))

0 commit comments

Comments
 (0)