replace handrolled binary copy with call to binary:copy
This commit is contained in:
parent
5efec8af8e
commit
2395d6cb72
1 changed files with 2 additions and 2 deletions
|
@ -156,7 +156,7 @@ encode(float, Float, _Opts) ->
|
|||
space(Opts) ->
|
||||
case Opts#opts.space of
|
||||
0 -> []
|
||||
; X when X > 0 -> [ ?space || _ <- lists:seq(1, X) ]
|
||||
; X when X > 0 -> binary:copy(?space, X)
|
||||
end.
|
||||
|
||||
|
||||
|
@ -164,7 +164,7 @@ indent(Opts) ->
|
|||
case Opts#opts.indent of
|
||||
0 -> []
|
||||
; X when X > 0 ->
|
||||
Indent = [ ?space || _ <- lists:seq(1, X) ],
|
||||
Indent = binary:copy(?space, X),
|
||||
indent(Indent, Opts#opts.depth, [?newline])
|
||||
end.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue