Skip to content

Conversation

@rnro
Copy link
Contributor

@rnro rnro commented Nov 6, 2024

Motivation:

Documentation checking catches more issues in Swift 6.0.

Modifications:

Adopt the Swift 6.0 image and fix the errors.

Result:

More accurate docs.

@rnro rnro added the 🔨 semver/patch No public API change. label Nov 6, 2024
@rnro rnro requested a review from glbrntt November 6, 2024 15:30
Copy link
Contributor

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

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

Awesome! Thanks for doing this Rick, I left a couple of comments on small things to fix.

/// Set `option` to `value` on this `Channel`.
/// - Parameters:
/// - option: The option to set.
/// - value: The new of the option.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// - value: The new of the option.
/// - value: The value of the option.


/// Returns a hex dump of this `ByteBuffer` in a preferred `HexDumpFormat`.
///
/// `hexDump` provides four formats:
Copy link
Contributor

Choose a reason for hiding this comment

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

apropos of nothing, "four" appears to no longer be correct here.

@preconcurrency
@inlinable
public func unwrap<NewValue: Sendable>(
orReplace replacement: NewValue
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the docs and code are clearer in terms of replacement here

@inlinable
@preconcurrency
public func unwrap<NewValue>(
orElse callback: @escaping @Sendable () -> NewValue
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, I think callback is clearer than orElse in the docs etc.

Motivation:

Documentation checking catches more issues in Swift 6.0.

Modifications:

Adopt the Swift 6.0 image and fix the errors.

Result:

More accurate docs.
@rnro rnro requested a review from glbrntt November 7, 2024 12:55
@rnro rnro merged commit adfd61a into apple:main Nov 7, 2024
41 of 43 checks passed
@rnro rnro deleted the fix_docs_errors branch November 7, 2024 13:03
Lukasa pushed a commit to Lukasa/swift-nio that referenced this pull request Nov 21, 2024
Documentation checking catches more issues in Swift 6.0.

Adopt the Swift 6.0 image and fix the errors.

More accurate docs.

(cherry picked from commit adfd61a)
Lukasa pushed a commit to Lukasa/swift-nio that referenced this pull request Nov 21, 2024
Documentation checking catches more issues in Swift 6.0.

Adopt the Swift 6.0 image and fix the errors.

More accurate docs.

(cherry picked from commit adfd61a)
Lukasa added a commit that referenced this pull request Nov 22, 2024
Documentation checking catches more issues in Swift 6.0.

Adopt the Swift 6.0 image and fix the errors.

More accurate docs.

(cherry picked from commit adfd61a)

Co-authored-by: Rick Newton-Rogers <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants