# gpui_macos: Migrate \`register_url_scheme\` to \`objc2\` \(\#63945\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 907b55f7eabef9b9c4197daec1bb913efae08ebe

Requested commit: 907b55f7eabef9b9c4197daec1bb913efae08ebe

Commit: 907b55f7eabef9b9c4197daec1bb913efae08ebe

Tree: fc8cc199b0f5882799c98a3f41a24048437a3b81

Author: tidely

Committer: GitHub

## Message

```
gpui_macos: Migrate `register_url_scheme` to `objc2` (#63945)

# Objective

The `block` crate will no longer compile with some unspecified future
version of Rust. The long term goal is to get rid of the `block` crate
entirely, and this is one such step.

## Solution

Migrate a standalone function to the `objc2` crate family. Removes many
lines of unsafe code, and switches from `block` to `block2`.

## Testing

All of the calls to `objc2` are identical to the ones in the old code.

Release Notes:

- N/A

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
```

## Parents

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

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