Skip to content

Commit

Permalink
Merge pull request #175 from lorentey/PersistentCollections-updates
Browse files Browse the repository at this point in the history
Persistent collections updates
  • Loading branch information
lorentey committed Sep 9, 2022
2 parents ef29f79 + 14f9062 commit 366850d
Show file tree
Hide file tree
Showing 17 changed files with 744 additions and 605 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ extension PersistentDictionary: Collection {

/// Returns the index for the given key.
public func index(forKey key: Key) -> Index? {
rootNode.index(key, _computeHash(key), 0, 0)
rootNode.index(forKey: key, _HashPath(key), 0)
}

/// Accesses the key-value pair at the specified position.
public subscript(position: Index) -> Element {
rootNode.get(position: position, 0, position._value)
rootNode.item(position: position._value)
}
}

Loading

0 comments on commit 366850d

Please sign in to comment.