Skip to content

Commit

Permalink
makes StaticMemoryTokenBucketStorage const
Browse files Browse the repository at this point in the history
  • Loading branch information
maeddin committed Jul 28, 2024
1 parent ce50226 commit a2628a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/token_bucket_storage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class StaticMemoryTokenBucketStorage extends TokenBucketStorage {

final Object key;

StaticMemoryTokenBucketStorage({required this.key});
const StaticMemoryTokenBucketStorage({required this.key});

@override
TokenBucketState? get() => _states[key];
Expand Down
2 changes: 1 addition & 1 deletion test/token_bucket_storage_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ void main() {
});

test('StaticMemoryTokenBucketStorage', () {
_testStorage(StaticMemoryTokenBucketStorage(key: 'test'));
_testStorage(const StaticMemoryTokenBucketStorage(key: 'test'));
});
}

0 comments on commit a2628a0

Please sign in to comment.