refactor: remove duplicate code in fixed-queue.ts
[poolifier.git] / src / fixed-queue.ts
index 42034e2fc887c34b461c7303f8049a2b0351d32f..e9003f70d8623804877170cb4cd9dc8c690a0163 100644 (file)
@@ -21,16 +21,4 @@ export class FixedQueue<T>
     this.nodeArray[index] = { data, priority: priority ?? 0 }
     return ++this.size
   }
-
-  /** @inheritdoc */
-  public get (index: number): T | undefined {
-    if (this.empty() || index >= this.size) {
-      return undefined
-    }
-    index += this.start
-    if (index >= this.capacity) {
-      index -= this.capacity
-    }
-    return this.nodeArray[index].data
-  }
 }