We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
pairs()
Base.Dict
1 parent 800e39c commit ae8ceffCopy full SHA for ae8ceff
src/registry_testing.jl
@@ -262,7 +262,12 @@ end
262
# Apply `_spacify_hyphens()` recursively through a dictionary
263
function _spacify_hyphens(dict::Dict{K, V}) where {K, V}
264
new_dict = Dict{K, V}()
265
- for (k, v) in pairs(dict)
+ # Note: `Base.Dict` iterates key-value pairs, so it's sufficient for us to do
266
+ # `for (k, v) in dict`. However, there are some other dictionary implementations
267
+ # (such as the Dictionaries.jl package) that do not iterate key-value pairs. So,
268
+ # if we ever decide to widen the type signature of this method, we'll need to
269
+ # change `(k, v) in dict` to `(k, v) in pairs(dict)`.
270
+ for (k, v) in dict
271
new_k = _spacify_hyphens(k)
272
new_v = _spacify_hyphens(v)
273
end
0 commit comments