Revert to the old behavior for query-map if no :into is specified
The previous change constitutes a breaking change, existing code might rely on
the behavior of returning nil, e.g. in an if-let.
(if-let [m (query-map uri)] ,,,)
However, when an explicit :into is provided, it is reasonable to assume that
you expect something of the same type to be returned. E.g. when calling
(query-map uri {:into (sorted-map)}), it is reasonable to expect that the
result is a sorted-map.
So this is a compromise, where we return :into if it is explicitly specified,
or nil if not.
Revert to the old behavior for query-map if no
:into
is specifiedThe previous change constitutes a breaking change, existing code might rely on the behavior of returning
nil
, e.g. in anif-let
.However, when an explicit
:into
is provided, it is reasonable to assume that you expect something of the same type to be returned. E.g. when calling(query-map uri {:into (sorted-map)})
, it is reasonable to expect that the result is a sorted-map.So this is a compromise, where we return
:into
if it is explicitly specified, ornil
if not.