use List.unmodifiable when possible
R=nweiz@google.com
Review URL: https://codereview.chromium.org//1940453003 .
diff --git a/lib/src/chain.dart b/lib/src/chain.dart
index a27e8a6..fdb0917 100644
--- a/lib/src/chain.dart
+++ b/lib/src/chain.dart
@@ -3,7 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:async';
-import 'dart:collection';
import 'dart:math' as math;
import 'frame.dart';
@@ -146,7 +145,7 @@
/// Returns a new [Chain] comprised of [traces].
Chain(Iterable<Trace> traces)
- : traces = new UnmodifiableListView<Trace>(traces.toList());
+ : traces = new List<Trace>.unmodifiable(traces);
/// Returns a terser version of [this].
///
diff --git a/lib/src/trace.dart b/lib/src/trace.dart
index 0a7f320..8537b62 100644
--- a/lib/src/trace.dart
+++ b/lib/src/trace.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-import 'dart:collection';
import 'dart:math' as math;
import 'chain.dart';
@@ -205,7 +204,7 @@
/// Returns a new [Trace] comprised of [frames].
Trace(Iterable<Frame> frames)
- : frames = new UnmodifiableListView<Frame>(frames.toList());
+ : frames = new List<Frame>.unmodifiable(frames);
/// Returns a VM-style [StackTrace] object.
///
diff --git a/pubspec.yaml b/pubspec.yaml
index e49783e..ac3c311 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -7,9 +7,9 @@
#
# When the major version is upgraded, you *must* update that version constraint
# in pub to stay in sync with this.
-version: 1.6.5
+version: 1.6.6-dev
author: "Dart Team <misc@dartlang.org>"
-homepage: http://github.com/dart-lang/stack_trace
+homepage: https://github.com/dart-lang/stack_trace
description: >
A package for manipulating stack traces and printing them readably.