Skip to content

Conversation

@fredrikekre
Copy link
Member

Alternative to #22184 / #22186

@fredrikekre fredrikekre added deprecation This change introduces or involves a deprecation strings "Strings!" labels Aug 9, 2017
end

# PR #23187
@deprecate cpad(s, n::Integer, p=" ") rpad(lpad(s,div(n+strwidth(s),2),p),n,p) false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more spaces might improve readability? :)

function warnbanner(msg...; label="[ WARNING ]", prefix="")
cols = Base.displaysize(STDERR)[2]
warn(prefix="", Base.cpad(label,cols,"="))
str = rpad(lpad(label,div(cols+strwidth(label),2),"="),cols,"=")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise here, a few spaces might improve readability :).

NEWS.md Outdated
* Calling `union` with no arguments is deprecated; construct an empty set with an appropriate
element type using `Set{T}()` instead ([#23144]).

* `Base.cpad` is removed; use appropriate combination of `rpad` and `lpad` instead ([#23187]).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps "is removed" -> "has been removed" or "is deprecated", and perhaps "use appropriate" -> "use an appropriate"? :)

Copy link
Member

@Sacha0 Sacha0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the followup review request! That's a great approach :).

@fredrikekre
Copy link
Member Author

Double time-out on travis...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deprecation This change introduces or involves a deprecation strings "Strings!"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants