Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: lib/src/util.dart

Issue 837193005: pkg/shelf: formatted code (Closed) Base URL: https://github.com/dart-lang/shelf.git@master
Patch Set: nits Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/src/shelf_unmodifiable_map.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library shelf.util; 5 library shelf.util;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:stack_trace/stack_trace.dart'; 9 import 'package:stack_trace/stack_trace.dart';
10 10
(...skipping 20 matching lines...) Expand all
31 /// Returns a [Map] with the values from [original] and the values from 31 /// Returns a [Map] with the values from [original] and the values from
32 /// [updates]. 32 /// [updates].
33 /// 33 ///
34 /// For keys that are the same between [original] and [updates], the value in 34 /// For keys that are the same between [original] and [updates], the value in
35 /// [updates] is used. 35 /// [updates] is used.
36 /// 36 ///
37 /// If [updates] is `null` or empty, [original] is returned unchanged. 37 /// If [updates] is `null` or empty, [original] is returned unchanged.
38 Map updateMap(Map original, Map updates) { 38 Map updateMap(Map original, Map updates) {
39 if (updates == null || updates.isEmpty) return original; 39 if (updates == null || updates.isEmpty) return original;
40 40
41 return new Map.from(original) 41 return new Map.from(original)..addAll(updates);
42 ..addAll(updates);
43 } 42 }
OLDNEW
« no previous file with comments | « lib/src/shelf_unmodifiable_map.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698