# Add TreeMap::remove_between that can take abstract start and end points · gitcafe/zed

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

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

Visibility: public

Requested revision: ee3637216eb44bd146d7426d22e5e0d8ad149a51

Requested commit: ee3637216eb44bd146d7426d22e5e0d8ad149a51

Commit: ee3637216eb44bd146d7426d22e5e0d8ad149a51

Tree: 6f47db9b293f9a78ad032d4912b3ab484bc6c757

Author: Nathan Sobo

Committer: Mikayla Maki

## Message

```
Add TreeMap::remove_between that can take abstract start and end points

This commit introduces a new adaptor trait for SeekTarget that works around
frustrating issues with lifetimes. It wraps the arguments in a newtype wrapper
that lives on the stack to avoid the lifetime getting extended to the caller
of the method.

This allows us to introduce a PathSuccessor object that can be passed as the
end argument of remove_between to remove a whole subtree.

```

## Parents

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

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