# clock: Cleanup \`ReplicaId\`, \`Lamport\` and \`Global\` \(\#40600\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 43a9368dff31882bb0dab3ad7660f05ea8953d2e

Requested commit: 43a9368dff31882bb0dab3ad7660f05ea8953d2e

Commit: 43a9368dff31882bb0dab3ad7660f05ea8953d2e

Tree: 459e788e17ea33f72cd7d7a695b6a635732082f2

Author: Lukas Wirth

Committer: GitHub

## Message

```
clock: Cleanup `ReplicaId`, `Lamport` and `Global` (#40600)

- Notable change is the use of a newtype for `ReplicaId`
- Fixes `WorktreeStore::create_remote_worktree` creating a remote
worktree with the local replica id, though this is not currently used
- Fixes observing the `Agent` (that is following the agent) causing
global clocks to allocate 65535 elements
- Shrinks the size of `Global` a bit. In a local or non-collab remote
session it won't ever allocate still.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
```

## Parents

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

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