Skip to content

Commit

Permalink
Followup of crystal-lang#9134. Missing swap of arguments (crystal-lan…
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian J. Cardiff authored May 13, 2020
1 parent a3ec85a commit 32a6282
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/log/format.cr
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Log
# This writes the severity in uppercase and left padded
# with enough space so all the severities fit
def severity
@entry.severity.label.rjust(7, @io)
@entry.severity.label.rjust(@io, 7)
end

# Write the source for non-root entries
Expand Down
6 changes: 3 additions & 3 deletions src/time.cr
Original file line number Diff line number Diff line change
Expand Up @@ -1034,13 +1034,13 @@ struct Time
#
# The name of the location is appended unless it is a fixed zone offset.
def inspect(io : IO, with_nanoseconds = true) : Nil
to_s "%F %T", io
to_s io, "%F %T"

if with_nanoseconds
if @nanoseconds == 0
io << ".0"
else
to_s ".%N", io
to_s io, ".%N"
end
end

Expand All @@ -1060,7 +1060,7 @@ struct Time
# When the location is `UTC`, the offset is replaced with the string `UTC`.
# Offset seconds are omitted if `0`.
def to_s(io : IO) : Nil
to_s("%F %T ", io)
to_s(io, "%F %T ")

if utc?
io << "UTC"
Expand Down

0 comments on commit 32a6282

Please sign in to comment.