Skip to content

Commit

Permalink
style: optimization of code style of HashMap
Browse files Browse the repository at this point in the history
  • Loading branch information
zrwusa authored and zrwusa committed Sep 19, 2024
1 parent 986e7cf commit bf37a4d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/data-structures/hash/hash-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,8 @@ export class HashMap<K = any, V = any, R = [K, V]> extends IterableEntryBase<K,
super();
if (options) {
const { hashFn, toEntryFn } = options;
if (hashFn) {
this._hashFn = hashFn;
}
if (toEntryFn) {
this._toEntryFn = toEntryFn;
}
if (hashFn) this._hashFn = hashFn;
if (toEntryFn) this._toEntryFn = toEntryFn;
}
if (entryOrRawElements) {
this.setMany(entryOrRawElements);
Expand Down

0 comments on commit bf37a4d

Please sign in to comment.