-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix to make the string being attached to coloredLogStream colored again #192
Conversation
Sources/Public/Pretty.swift
Outdated
let coloredOption: Option = { | ||
var op = option | ||
op.colored = true | ||
return op | ||
}() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't a code like the following suffice?
let coloredOption: Option = { | |
var op = option | |
op.colored = true | |
return op | |
}() | |
let coloredOption = option | |
coloredOption.colored = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swift compiler says for the suggested above:
cannot assign to property: 'coloredOption' is a 'let' constant
var
is ok:
var coloredOption = option
coloredOption.colored = true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I wrong.
Use var
instead of let
is corrected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YusukeHosonuma
I've refactored in 7582ec5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
thx! |
Fixed a bug caused in PR #165 and #173 where strings for
output-colored.log
were no longer colored.this fixes #184.