use tokio::sync::broadcast;

/// A small helper to fire the "close" channel when it's dropped.
pub struct OnClose(pub broadcast::Sender<()>);

impl Drop for OnClose {
    fn drop(&mut self) {
        let _ = self.0.send(());
    }
}
