minor: Remove peer_data.clear().

This commit is contained in:
Steve Howell
2021-01-31 13:43:16 +00:00
committed by Tim Abbott
parent 58855e8224
commit 17ea215f18
2 changed files with 1 additions and 6 deletions

View File

@@ -2,7 +2,7 @@ const {LazySet} = require("./lazy_set");
const people = require("./people"); const people = require("./people");
// This maps a stream_id to a LazySet of user_ids who are subscribed. // 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) { function assert_number(id) {
if (typeof id !== "number") { if (typeof id !== "number") {
@@ -29,10 +29,6 @@ function get_user_set(stream_id) {
return subscribers; return subscribers;
} }
export function clear() {
stream_subscribers = new Map();
}
export function is_subscriber_subset(stream_id1, stream_id2) { export function is_subscriber_subset(stream_id1, stream_id2) {
const sub1_set = get_user_set(stream_id1); const sub1_set = get_user_set(stream_id1);
const sub2_set = get_user_set(stream_id2); const sub2_set = get_user_set(stream_id2);

View File

@@ -140,7 +140,6 @@ exports.clear_subscriptions = function () {
// it should only be used in tests. // it should only be used in tests.
stream_info = new BinaryDict((sub) => sub.subscribed); stream_info = new BinaryDict((sub) => sub.subscribed);
subs_by_stream_id = new Map(); subs_by_stream_id = new Map();
peer_data.clear();
}; };
exports.clear_subscriptions(); exports.clear_subscriptions();