From 17ea215f18f8d41d35fc45a59ddbb4696f8dfa5b Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Sun, 31 Jan 2021 13:43:16 +0000 Subject: [PATCH] minor: Remove peer_data.clear(). --- static/js/peer_data.js | 6 +----- static/js/stream_data.js | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/static/js/peer_data.js b/static/js/peer_data.js index 3f3f3eab1a..0ea5f1546e 100644 --- a/static/js/peer_data.js +++ b/static/js/peer_data.js @@ -2,7 +2,7 @@ const {LazySet} = require("./lazy_set"); const people = require("./people"); // This maps a stream_id to a LazySet of user_ids who are subscribed. -let stream_subscribers; +const stream_subscribers = new Map(); function assert_number(id) { if (typeof id !== "number") { @@ -29,10 +29,6 @@ function get_user_set(stream_id) { return subscribers; } -export function clear() { - stream_subscribers = new Map(); -} - export function is_subscriber_subset(stream_id1, stream_id2) { const sub1_set = get_user_set(stream_id1); const sub2_set = get_user_set(stream_id2); diff --git a/static/js/stream_data.js b/static/js/stream_data.js index 88f2c7966b..161367f221 100644 --- a/static/js/stream_data.js +++ b/static/js/stream_data.js @@ -140,7 +140,6 @@ exports.clear_subscriptions = function () { // it should only be used in tests. stream_info = new BinaryDict((sub) => sub.subscribed); subs_by_stream_id = new Map(); - peer_data.clear(); }; exports.clear_subscriptions();