Skip to content

Commit

Permalink
Merge pull request apple#69 from amartini51/docs/develop
Browse files Browse the repository at this point in the history
Minor fixes in documentation comments
  • Loading branch information
amartini51 authored Nov 9, 2021
2 parents 689390f + 0c291a6 commit 2fa2678
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Sources/System/FilePath/FilePath.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/// encoding.
///
/// On construction, `FilePath` will normalize separators by removing
/// reduncant intermediary separators and stripping any trailing separators.
/// redundant intermediary separators and stripping any trailing separators.
/// On Windows, `FilePath` will also normalize forward slashes `/` into
/// backslashes `\`, as preferred by the platform.
///
Expand All @@ -29,7 +29,7 @@
/// try fd.closeAfter { try fd.writeAll(message.utf8) }
///
/// File paths conform to the
/// and <doc://com.apple.documentation/documentation/swift/equatable>
/// <doc://com.apple.documentation/documentation/swift/equatable>
/// and <doc://com.apple.documentation/documentation/swift/hashable> protocols
/// by performing the protocols' operations on their raw byte contents.
/// This conformance allows file paths to be used,
Expand Down
13 changes: 7 additions & 6 deletions Sources/System/FilePath/FilePathSyntax.swift
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ extension FilePath {
// @available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
extension FilePath {
/// If `prefix` is a prefix of `self`, removes it and returns `true`.
/// Otherwise returns `false`.
/// Otherwise returns `false`.
///
/// Example:
///
Expand Down Expand Up @@ -503,10 +503,11 @@ extension FilePath {
/// A leading separator is spurious if `self` is non-empty.
///
/// Example:
/// var path: FilePath = ""
/// path.append("/var/www/website") // "/var/www/website"
/// path.append("static/assets") // "/var/www/website/static/assets"
/// path.append("/main.css") // "/var/www/website/static/assets/main.css"
///
/// var path: FilePath = ""
/// path.append("/var/www/website") // "/var/www/website"
/// path.append("static/assets") // "/var/www/website/static/assets"
/// path.append("/main.css") // "/var/www/website/static/assets/main.css"
///
// TODO(Windows docs): example with roots, should we rephrase this "spurious
// roots"?
Expand Down Expand Up @@ -576,7 +577,7 @@ extension FilePath {
_append(unchecked: other._storage[...])
}

/// Non-mutating version of `push()`
/// Non-mutating version of `push()`.
///
// TODO(Windows docs): examples and docs with roots
public __consuming func pushing(_ other: __owned FilePath) -> FilePath {
Expand Down

0 comments on commit 2fa2678

Please sign in to comment.