Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Simplify to-json proto sig
Since each of the candidates has the same handling of the possible
named variables, it would seem to me that the specificity of the
proto sig would keep it from getting optimized away.

The sig was part of the original addition to the repo, so no other
information could be gleaned as to why this specific sig was used.
  • Loading branch information
lizmat committed Jan 13, 2016
1 parent 007f027 commit 1d413e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/JSON/Pretty.pm
Expand Up @@ -93,7 +93,7 @@ my class JSONException is Exception {
}
}

proto sub to-json($, :$indent = 0, :$first = 0) {*}
proto sub to-json(|) {*}

multi sub to-json(Version:D $v, :$indent = 0, :$first = 0) { to-json(~$v, :$indent, :$first) }
multi sub to-json(Real:D $d, :$indent = 0, :$first = 0) { (' ' x $first) ~ ~$d }
Expand Down

0 comments on commit 1d413e4

Please sign in to comment.