Skip to content

Commit

Permalink
Address PR comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
borut-t committed Dec 24, 2024
1 parent 23bf4c9 commit 9bc6708
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public extension Collection {
/// let outOfBounds = array[safe: 10] // returns nil
/// ```
subscript(safe index: Index) -> Element? {
if startIndex <= index && index < endIndex { self[index] } else { nil }
indices.contains(index) ? self[index] : nil
}
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Core/Extensions/Foundation/Data+PovioKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public extension Data {
/// let data = Data([0x01, 0xAB, 0xFF])
/// Logger.debug(data.hexadecimalString) // "01abff"
/// ```
var hexadecialString: String {
var hexadecimalString: String {
map { String(format: "%02x", $0) }.joined()
}

Expand Down

0 comments on commit 9bc6708

Please sign in to comment.