Merge pull request #69 from amartini51/docs/develop

Minor fixes in documentation comments
This commit is contained in:
Alex Martini authored and GitHub committed 2021-11-09 10:11:05 -08:00
commit 2fa26782e1
2 files changed
+9 -8

No files matched your search

+2 -2
View File
@@ -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.
///
@@ -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,
+7 -6
View File
@@ -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:
///
@@ -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"?
@@ -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 {