jw3126 / Setfield.jl

Update deeply nested immutable structs.
Other
167 stars 17 forks source link

Fix show for IndexLens #66

Closed tkf closed 5 years ago

tkf commented 5 years ago

I realized that show for lenses like @lens _[:a] and @lens _["a"] are not parse-able. This PR fixes it simply by using repr when printing indices.

Before:

julia> @lens _[:a]
(@lens _[a])

After:

julia> @lens _[:a]
(@lens _[:a])
codecov-io commented 5 years ago

Codecov Report

Merging #66 into master will decrease coverage by 5%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #66      +/-   ##
==========================================
- Coverage   94.05%   89.05%   -5.01%     
==========================================
  Files           5        4       -1     
  Lines         202      201       -1     
==========================================
- Hits          190      179      -11     
- Misses         12       22      +10
Impacted Files Coverage Δ
src/sugar.jl 83.33% <100%> (-8.34%) :arrow_down:
src/experimental.jl 83.33% <0%> (-11.12%) :arrow_down:
src/lens.jl 94.11% <0%> (-1.97%) :arrow_down:
src/settable.jl 93.33% <0%> (-1.67%) :arrow_down:
src/Setfield.jl

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4aacaf1...1af36b4. Read the comment docs.

jw3126 commented 5 years ago

LGTM, thanks!