-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zero for OneElement #332
zero for OneElement #332
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #332 +/- ##
=======================================
Coverage 99.90% 99.90%
=======================================
Files 8 8
Lines 1086 1093 +7
=======================================
+ Hits 1085 1092 +7
Misses 1 1 ☔ View full report in Codecov by Sentry. |
Seems good to add. But before adding, what is the contract for |
The main advantage is that |
I've updated this to return a zero based on the value and not the type. julia> using FillArrays
julia> v = OneElement(10, 3, 4)
4-element OneElement{Int64, 1, Tuple{Int64}, Tuple{Base.OneTo{Int64}}}:
⋅
⋅
10
⋅
julia> zero(v)
4-element OneElement{Int64, 1, Tuple{Int64}, Tuple{Base.OneTo{Int64}}}:
⋅
⋅
0
⋅ |
Gentle bump |
With this,