Skip to content
This repository was archived by the owner on Sep 10, 2022. It is now read-only.

Commit 3f0ae97

Browse files
committed
Remove illegal const constructors.
Remove test of default constructor, which seems unnecessary.
1 parent b7111fd commit 3f0ae97

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

lib/perf_api.dart

-8
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ import 'dart:async';
88
class Profiler {
99
final Counters counters = new Counters();
1010

11-
/**
12-
* Const constructor allows instances of this class to be used as a no-op
13-
* implementation.
14-
*/
15-
const Profiler();
16-
1711
/**
1812
* Starts a new timer for a given action [name]. A timer id will be
1913
* returned which can be used in [stopTimer] to stop the timer.
@@ -73,8 +67,6 @@ class Counters {
7367

7468
final Map<String, int> _counters = <String, int>{};
7569

76-
const Counters();
77-
7870
/**
7971
* Increments the counter under [counterName] by [delta]. Default [delta]
8072
* is 1. If counter is not yet initilalized, its value is assumed to be 0.

test/perf_api_test.dart

-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ import 'package:perf_api/perf_api.dart';
77

88
main() {
99

10-
test('should be able to instantiate as a noop profiler', () {
11-
expect(() => new Profiler(), returnsNormally);
12-
});
13-
1410
group('Default Impl', () {
1511
Profiler perf;
1612

0 commit comments

Comments
 (0)