Skip to content

Commit

Permalink
trim unnecessary Swift. prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tayloraswift committed Feb 21, 2024
1 parent a12f55a commit a63f4ce
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Sources/PNG/Formats/PNG.Format.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ extension PNG
/// - Parameter palette:
/// An palette of suggested posterization values. Most PNG viewers
/// ignore this field. Although the image color depth is `16`, the
/// palette atom type is ``Swift.UInt8``, not ``Swift.UInt16``.
/// palette atom type is ``UInt8``, not ``UInt16``.
///
/// This field is unrelated to, and should not be confused with a
/// ``SuggestedPalette``.
Expand Down Expand Up @@ -228,7 +228,7 @@ extension PNG
/// - Parameter palette:
/// An palette of suggested posterization values. Most PNG viewers
/// ignore this field. Although the image color depth is `16`, the
/// palette atom type is ``Swift.UInt8``, not ``Swift.UInt16``.
/// palette atom type is ``UInt8``, not ``UInt16``.
///
/// This field is unrelated to, and should not be confused with a
/// ``SuggestedPalette``.
Expand Down
2 changes: 1 addition & 1 deletion Sources/PNG/Lexing/PNG.BytestreamDestination.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protocol _PNGBytestreamDestination
/// - Parameter bytes:
/// The bytes to write.
/// - Returns:
/// A ``Swift.Void`` tuple, or `nil` if the write attempt failed. This
/// A ``Void`` tuple, or `nil` if the write attempt failed. This
/// method should return `nil` even if any number of bytes less than
/// `bytes.count` were successfully written.
mutating
Expand Down
2 changes: 1 addition & 1 deletion Sources/PNG/PNG.Image.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extension PNG
/// The raw backing storage of the image content.
///
/// Depending on the bit depth of the image, it either stores a matrix
/// of ``Swift.UInt8`` samples, or a matrix of big-endian ``Swift.UInt16``
/// of ``UInt8`` samples, or a matrix of big-endian ``UInt16``
/// samples. The pixels are arranged in row-major order, where the
/// beginning of the storage array corresponds to the visual top-left
/// corner of the image, regardless of whether the ``layout`` is
Expand Down
16 changes: 8 additions & 8 deletions Sources/PNG/PNG.swift
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ extension PNG
/// Converts an image data buffer to a pixel array, using the given
/// pixel kernel and dereferencing function.
///
/// This function casts each byte in `buffer` to an ``Swift.Int`` index,
/// This function casts each byte in `buffer` to an ``Int`` index,
/// and passes each index to the given `dereference` function, receiving
/// scalar atoms of type `A` in return. It then scales the atoms to the
/// range of `T`, and constructs instances of `C` by mapping the given
Expand Down Expand Up @@ -314,7 +314,7 @@ extension PNG
/// Converts an image data buffer to a pixel array, using the given
/// pixel kernel and dereferencing function.
///
/// This function casts each byte in `buffer` to an ``Swift.Int`` index,
/// This function casts each byte in `buffer` to an ``Int`` index,
/// and passes each index to the given `dereference` function, receiving
/// pairs of atoms of type `A` in return. It then scales the atoms to the
/// range of `T`, and constructs instances of `C` by mapping the given
Expand Down Expand Up @@ -365,7 +365,7 @@ extension PNG
/// Converts an image data buffer to a pixel array, using the given
/// pixel kernel and dereferencing function.
///
/// This function casts each byte in `buffer` to an ``Swift.Int`` index,
/// This function casts each byte in `buffer` to an ``Int`` index,
/// and passes each index to the given `dereference` function, receiving
/// triplets of atoms of type `A` in return. It then scales the atoms to the
/// range of `T`, and constructs instances of `C` by mapping the given
Expand Down Expand Up @@ -416,7 +416,7 @@ extension PNG
/// Converts an image data buffer to a pixel array, using the given
/// pixel kernel and dereferencing function.
///
/// This function casts each byte in `buffer` to an ``Swift.Int`` index,
/// This function casts each byte in `buffer` to an ``Int`` index,
/// and passes each index to the given `dereference` function, receiving
/// quadruplets of atoms of type `A` in return. It then scales the atoms to the
/// range of `T`, and constructs instances of `C` by mapping the given
Expand Down Expand Up @@ -797,7 +797,7 @@ extension PNG
/// This function maps the given `kernel` function over each element in
/// `pixels`, receiving scalar intensities of type `T` in return. It then
/// converts them into atoms of type `A`, scaling each intensity value
/// to the range of `A`. Each scalar atom is then converted to an ``Swift.Int``
/// to the range of `A`. Each scalar atom is then converted to an ``Int``
/// index using the given `reference` function, and stored as a byte in
/// the returned image data buffer.
///
Expand Down Expand Up @@ -858,7 +858,7 @@ extension PNG
/// This function maps the given `kernel` function over each element in
/// `pixels`, receiving `(T, T)` intensity pairs in return. It then
/// converts them into atoms of type `A`, scaling each intensity value
/// to the range of `A`. Each `(A, A)` pair is then converted to an ``Swift.Int``
/// to the range of `A`. Each `(A, A)` pair is then converted to an ``Int``
/// index using the given `reference` function, and stored as a byte in
/// the returned image data buffer.
///
Expand Down Expand Up @@ -920,7 +920,7 @@ extension PNG
/// `pixels`, receiving `(T, T, T)` intensity triplets in return. It then
/// converts them into atoms of type `A`, scaling each intensity value
/// to the range of `A`. Each `(A, A, A)` triplet is then converted to
/// an ``Swift.Int`` index using the given `reference` function, and
/// an ``Int`` index using the given `reference` function, and
/// stored as a byte in the returned image data buffer.
///
/// A worked example of how to use this function to implement a custom
Expand Down Expand Up @@ -981,7 +981,7 @@ extension PNG
/// `pixels`, receiving `(T, T, T, T)` intensity quadruplets in return.
/// It then converts them into atoms of type `A`, scaling each intensity value
/// to the range of `A`. Each `(A, A, A, A)` quadruplet is then converted to
/// an ``Swift.Int`` index using the given `reference` function, and
/// an ``Int`` index using the given `reference` function, and
/// stored as a byte in the returned image data buffer.
///
/// A worked example of how to use this function to implement a custom
Expand Down
4 changes: 2 additions & 2 deletions Sources/PNG/System.swift
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ extension System.File.Destination
/// - Parameter buffer:
/// The data to write.
/// - Returns:
/// A ``Swift.Void`` tuple if the entire array argument could be written,
/// A ``Void`` tuple if the entire array argument could be written,
/// or `nil` otherwise.
public
func write(_ buffer:[UInt8]) -> Void?
Expand Down Expand Up @@ -285,7 +285,7 @@ extension PNG.Image
/// it to `1`. Likewise, setting it to a value greater than `2147483647`
/// (2^31^\ –\ 1) is the same as setting it to `2147483647`.
/// - Returns:
/// A ``Swift.Void`` tuple if the destination file could be opened
/// A ``Void`` tuple if the destination file could be opened
/// successfully, or `nil` otherwise.
public
func compress(path:String, level:Int = 9, hint:Int = 1 << 15) throws -> Void?
Expand Down

0 comments on commit a63f4ce

Please sign in to comment.