# sum_tree: Store context on cursor \(\#34904\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/64d0fec699607f4cef8b2625fef62d1ea105a2ed)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 64d0fec699607f4cef8b2625fef62d1ea105a2ed

Requested commit: 64d0fec699607f4cef8b2625fef62d1ea105a2ed

Commit: 64d0fec699607f4cef8b2625fef62d1ea105a2ed

Tree: 1d9ee55084a9e870e4389f191d5f4ebc1bc6f075

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
sum_tree: Store context on cursor (#34904)

This gets rid of the need to pass context to all cursor functions. In
practice context is always immutable when interacting with cursors.

A nicety of this is in the follow-up PR we will be able to implement
Iterator for all Cursors/filter cursors (hell, we may be able to get rid
of filter cursor altogether, as it is just a custom `filter` impl on
iterator trait).
Release Notes:

- N/A
```

## Parents

- [fa3e1ccc37373777756283829d180e41e63f8d1a](https://git.cafe/gitcafe/zed/commit/fa3e1ccc37373777756283829d180e41e63f8d1a?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/64d0fec699607f4cef8b2625fef62d1ea105a2ed?format=markdown)
