mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
d7fcb049d4
This commit fixes a panic that could occur when registering N subscriptions for N entities of the same kind. Before, when dropping the first of the subscriptions, we would remove the entity ID extractor as well. This was, however, used by all the other N - 1 subscriptions which would then start losing messages. In addition, dropping yet another subscription of that kind would result in a panic, because we wouldn't find the extractor in the map upon invoking `Subscription::drop`. With this change we will avoid removing the ID extractor when dropping a subscription. Crucially, we also avoid inserting extractors for simple message subscriptions. This enables these non-entity subscriptions to be dropped and re-registered without seeing a "registered handler for the same message twice" panic. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |