# Remove methods taking \`&mut Workspace\` from \`Pane\` \(\#2540\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 1fc9103b61cf6e88ef76b6c5e0530c1997b0cb74

Requested commit: 1fc9103b61cf6e88ef76b6c5e0530c1997b0cb74

Commit: 1fc9103b61cf6e88ef76b6c5e0530c1997b0cb74

Tree: 1bb44cf2e96ed7f565e6c6299e8950f63f2f222b

Author: Antonio Scandurra

Committer: GitHub

## Message

```
Remove methods taking `&mut Workspace` from `Pane` (#2540)

This pull request simplifies the `Pane` struct by replacing methods like
`Pane::add_item` that would previously take a `&mut Workspace` with
methods that take a `&mut self`. When access to the workspace is needed,
we now either emit an event from the `Pane` or directly move the method
to the `Workspace` struct.
```

## Parents

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

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

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