-
Notifications
You must be signed in to change notification settings - Fork 96
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
deprecate: inconsistent api @sorted_map.of #1593
deprecate: inconsistent api @sorted_map.of #1593
Conversation
Pull Request Test Coverage Report for Build 5192Details
💛 - Coveralls |
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.
The from_array
should also be implemented
sorted_map/map.mbt
Outdated
pub fn of[K : Compare, V](entries : Array[(K, V)]) -> T[K, V] { | ||
///| | ||
/// Creates a sorted map from a fixed array of key-value pairs. | ||
pub fn of[K : Compare, V](entries : FixedArray[(K, V)]) -> T[K, V] { |
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.
This is a breaking change: not a deprecation.
For deprecation, you should use deprecation warning, tell people what to do, and then change the API in the next release
pub fn of[K : Compare, V](entries : FixedArray[(K, V)]) -> T[K, V] { | |
/// @alert deprecated "Use @sorted_map.from_array instead" | |
pub fn of[K : Compare, V](entries : Array[(K, V)]) -> T[K, V] { |
cd673b6
to
205566b
Compare
bleeding-check failed is another issus.
|
Don't worry, it's just a grammar change. |
I think deprecate old API is impossible