mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-19 06:59:22 +01:00
dde76a1dca
## Summary Some general reshuffling cleanups, more notable are the SubscriberSet changes: - Add a concrete `SingleSubscriberSet` for single-emitter observers, removing the unnecessary outer map and emitter-key arguments. - Keep `SubscriberSet` for observers grouped by entity or type. - Replace separate activation and cancellation flags with one shared `Pending | Active | Dropped` state, saving one `Rc` allocation per subscription. - Make `insert` immediately active and add `insert_pending` for deferred activation, simplifying callers while preserving existing activation timing. - Preserve registration order and cancellation behavior when callbacks add or drop subscriptions during dispatch. Merge retained subscriptions with `BTreeMap::appen`d, avoiding rebuilding the tree when the destination is empty. Best reviewed commit by commit. The first commit [1740a07](https://github.com/zed-industries/zed/pull/66156/commits/1740a0718faddf57feb8cb0946a286585548ad3f) re-orders the import / mod prelude a bit and gets rid of the lint allows by fixing their offenses. Release Notes: - [GPUI] N/A