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

Commit 9f8a17f

Browse files
committed
use List.unmodifiable when possible
[email protected] Review URL: https://codereview.chromium.org//1940453003 .
1 parent b528ff4 commit 9f8a17f

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

lib/src/chain.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
import 'dart:async';
6-
import 'dart:collection';
76
import 'dart:math' as math;
87

98
import 'frame.dart';
@@ -146,7 +145,7 @@ class Chain implements StackTrace {
146145

147146
/// Returns a new [Chain] comprised of [traces].
148147
Chain(Iterable<Trace> traces)
149-
: traces = new UnmodifiableListView<Trace>(traces.toList());
148+
: traces = new List<Trace>.unmodifiable(traces);
150149

151150
/// Returns a terser version of [this].
152151
///

lib/src/trace.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
import 'dart:collection';
65
import 'dart:math' as math;
76

87
import 'chain.dart';
@@ -205,7 +204,7 @@ class Trace implements StackTrace {
205204

206205
/// Returns a new [Trace] comprised of [frames].
207206
Trace(Iterable<Frame> frames)
208-
: frames = new UnmodifiableListView<Frame>(frames.toList());
207+
: frames = new List<Frame>.unmodifiable(frames);
209208

210209
/// Returns a VM-style [StackTrace] object.
211210
///

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ name: stack_trace
77
#
88
# When the major version is upgraded, you *must* update that version constraint
99
# in pub to stay in sync with this.
10-
version: 1.6.5
10+
version: 1.6.6-dev
1111
author: "Dart Team <[email protected]>"
12-
homepage: http://github.com/dart-lang/stack_trace
12+
homepage: https://github.com/dart-lang/stack_trace
1313
description: >
1414
A package for manipulating stack traces and printing them readably.
1515

0 commit comments

Comments
 (0)