From 0c4004ddd3354a30f7f6d206eb1872b6b8d06f33 Mon Sep 17 00:00:00 2001 From: Evan Hahn Date: Wed, 13 Mar 2024 12:28:47 -0500 Subject: [PATCH] chore: remove unused method from Bitfield class (#41) `Bitfield.prototype.clear` was never used, so we can remove it. --- lib/bitfield.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/bitfield.js b/lib/bitfield.js index e734543..007ef6c 100644 --- a/lib/bitfield.js +++ b/lib/bitfield.js @@ -106,17 +106,6 @@ class Bitfield { this.unflushed?.push(p) } - /** @returns {Promise} */ - clear() { - return new Promise((resolve, reject) => { - if (!this.storage) return resolve() - this.storage.del(0, Infinity, (err) => { - if (err) reject(err) - else resolve() - }) - }) - } - /** @returns {Promise} */ close() { return new Promise((resolve, reject) => {