-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix parameter, doc comments in Span family #82102
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
CC @glessard |
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.
Thanks @valeriyvan!
@swift-ci please smoke test |
@@ -301,11 +301,11 @@ extension RawSpan { | |||
@lifetime(borrow pointer) | |||
public init<T: BitwiseCopyable>( | |||
_unsafeStart pointer: UnsafePointer<T>, | |||
count: Int | |||
byteCount: Int |
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 really is count
. It is the number of T
elements. Below, we passed count * MemoryLayout<T>.stride
to the byteCount
-taking initializer. It would also be source-breaking, which we will only want to do when we officially review the RawSpan
initializers and deprecate this spelling.
For now, let's remove the changes from lines 304-308. Thanks!
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.
I have reverted this change and fixed this func's doc comment to match parameters naming.
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.
Thanks!
…oc comment and match other methods" This reverts commit 4129383.
@swift-ci please smoke test |
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.
Let's have the initializer doc-comment mention elements rather than bytes, it will be more logical.
Co-authored-by: Guillaume Lessard <[email protected]>
Co-authored-by: Guillaume Lessard <[email protected]>
@swift-ci please smoke test |
@swift-ci please smoke test linux platform |
@swift-ci smoke test linux |
@swift-ci smoke test Linux platform |
1 similar comment
@swift-ci smoke test Linux platform |
No description provided.