# context_menu: Use \`when\` instead of if-block \(\#24566\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 0fd220366538ede11d54e1d0162ea6c07d335f5f

Requested commit: 0fd220366538ede11d54e1d0162ea6c07d335f5f

Commit: 0fd220366538ede11d54e1d0162ea6c07d335f5f

Tree: 9e0523700cae9c90943ea18e860e31fcc0e1a987

Author: Finn Evers

Committer: GitHub

## Message

```
context_menu: Use `when` instead of if-block (#24566)

See
https://github.com/zed-industries/zed/pull/24562#issuecomment-2648343416
. Should have just added that to my original comment btw - sorry!

CC @danilo-leal 

Release Notes:

- N/A
```

## Parents

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

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