Skip to content

Commit

Permalink
Add one example and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Tokazama committed Feb 27, 2020
1 parent 9f6d1a2 commit d446128
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "StaticRanges"
uuid = "d8176aec-3168-11e9-3c98-e3954798be3a"
authors = ["zchristensen "]
version = "0.5.1"
version = "0.5.2"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Expand Down
8 changes: 6 additions & 2 deletions src/staticness.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ false
julia> is_static(StepRange(1, 2, 20))
false
julia> is_static(())
true
```
"""
@inline function is_static(::Type{T}) where {T}
Expand All @@ -120,8 +123,8 @@ false
return is_static(T)
end
end
is_static(::Type{Tuple}) = true
is_static(::Type{NamedTuple}) = true
is_static(::Type{T}) where {T<:Tuple} = true
is_static(::Type{T}) where {T<:NamedTuple} = true

"""
is_fixed(x) -> Bool
Expand Down Expand Up @@ -277,3 +280,4 @@ as_static(x::Union{LinRange,LinMRange}) = LinSRange(first(x), last(x), length(x)

as_static(x::StepSRangeLen) = x
as_static(x::Union{StepRangeLen,StepMRangeLen}) = StepSRangeLen(first(x), step(x), length(x), x.offset)

4 comments on commit d446128

@Tokazama
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/10206

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.2 -m "<description of version>" d446128b54e61f988dbf36841ea862a31eac490c
git push origin v0.5.2

@Tokazama
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error while trying to register: Version 0.5.2 already exists

Please sign in to comment.