Skip to content

[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

Merged
merged 1 commit into from
Jun 15, 2018

Conversation

natecook1000
Copy link
Member

  • 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

///
/// - Complexity: O(1) if the collection conforms to
/// `RandomAccessCollection`; otherwise, O(*n*), where *n* is the absolute
/// value of `n`.
Copy link
Contributor

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.

Copy link
Member Author

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.

@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

@natecook1000
Copy link
Member Author

I'm separating out the complexity annotation changes for their own review.

@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

@natecook1000
Copy link
Member Author

@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
@natecook1000
Copy link
Member Author

@swift-ci Please smoke test and merge

@swift-ci swift-ci merged commit 6dc658f into swiftlang:master Jun 15, 2018
@natecook1000 natecook1000 deleted the nc-fixes-86-1 branch October 4, 2018 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants