Skip to content

Commit b1f008e

Browse files
authored
Fix unused param in a private ctor lint (dart-archive/yaml_edit#99)
1 parent 42e46a6 commit b1f008e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkgs/yaml_edit/test/random_test.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ import 'test_utils.dart';
1717
/// inputs (boolean, null, strings, or numbers) to modify the YAML and assert
1818
/// that the change produced was expected.
1919
void main() {
20-
const seed = 0;
21-
final generator = _Generator(seed: seed);
20+
final generator = _Generator(maxDepth: 5);
2221

2322
const roundsOfTesting = 40;
2423
const modificationsPerRound = 1000;
@@ -66,7 +65,7 @@ class _Generator {
6665
final int maxDepth;
6766

6867
// ignore: unused_element
69-
_Generator({int? seed, this.maxDepth = 5}) : r = Random(seed ?? 42);
68+
_Generator({int seed = 0, required this.maxDepth}) : r = Random(seed);
7069

7170
int nextInt([int max = maxInt]) => r.nextInt(max);
7271

0 commit comments

Comments
 (0)