-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib] Revise documentation comments #17109
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
Conversation
natecook1000
commented
Jun 11, 2018
- Clarify RawValue requirement for OptionSet
- Make Bool counterexample more clearly an error
- Add clarifying note about unsafe arithmetic methods
- Add/refine complexity docs for sequence/collection
stdlib/public/core/Collection.swift
Outdated
/// | ||
/// - Complexity: O(1) if the collection conforms to | ||
/// `RandomAccessCollection`; otherwise, O(*n*), where *n* is the absolute | ||
/// value of `n`. |
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.
Shouldn't this be "where n is the length of the collection"? (same for the default implementations of randomElement(using:)
and randomElement()
) I'm not sure it's clear what n
refers to otherwise.
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.
Wow, thanks — that's definitely the wrong boilerplate.
1fc6ae9
to
4836bb5
Compare
@swift-ci Please smoke test |
4836bb5
to
aed532b
Compare
I'm separating out the complexity annotation changes for their own review. |
@swift-ci Please smoke test |
@swift-ci Please smoke test macOS platform |
- Clarify RawValue requirement for OptionSet - Make Bool counterexample more clearly an error - Add clarifying note about unsafe arithmetic methods - Add/refine complexity docs for sequence/collection - Remove docs from obsoleted symbols - Standardize on unicode.org for links about Unicode - More complexity annotations - Expand dictionary defaulted subscript docs - Fix error in Dictionary.init(minimumCapacity:) docs - Improve accuracy of prime number listing
aed532b
to
653a4d8
Compare
@swift-ci Please smoke test and merge |