Skip to content

Commit e19a763

Browse files
committed
fixes
1 parent 91bfdc7 commit e19a763

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

lib/src/directed_graph.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ class DirectedGraph<Key extends Comparable, NodeData, EdgeData> {
2727

2828
factory DirectedGraph.fromMap(Map<Key, Object> source) {
2929
// TODO: replace with HashMap.fromEntries - dart-lang/sdk#34818
30-
final hashMap = HashMap<Key, NodeImpl<Key, NodeData, EdgeData>>()
31-
..addEntries(
32-
source.entries.map((e) => _fromMapValue<Key, NodeData, EdgeData>(e)));
33-
return DirectedGraph._(hashMap);
30+
return DirectedGraph._(
31+
HashMap()..addEntries(source.entries.map(_fromMapValue)));
3432
}
3533

3634
bool add(Key node, {NodeData data}) {

0 commit comments

Comments
 (0)