Skip to content

Commit

Permalink
Make find by methods public
Browse files Browse the repository at this point in the history
  • Loading branch information
ladvoc committed Sep 11, 2024
1 parent edc7cbb commit ace27f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/BijectiveDictionary/BijectiveDictionary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@ public struct BijectiveDictionary<Left: Hashable, Right: Hashable> {
}

/// Find a left-right pair in the dictionary by left value.
@inlinable internal func findPairByLeft(_ leftValue: Left) -> Element? {
@inlinable public func findPairByLeft(_ leftValue: Left) -> Element? {
guard let rightValue = self[left: leftValue] else { return nil }
return (leftValue, rightValue)
}

/// Find a left-right pair in the dictionary by right value.
@inlinable internal func findPairByRight(_ rightValue: Right) -> Element? {
@inlinable public func findPairByRight(_ rightValue: Right) -> Element? {
guard let leftValue = self[right: rightValue] else { return nil }
return (leftValue, rightValue)
}
Expand Down

0 comments on commit ace27f7

Please sign in to comment.