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

Unified Diff: sdk/lib/_internal/pub/lib/src/solver/solve_report.dart

Issue 243683002: Refactor Source. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise all the things. Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub/lib/src/solver/solve_report.dart
diff --git a/sdk/lib/_internal/pub/lib/src/solver/solve_report.dart b/sdk/lib/_internal/pub/lib/src/solver/solve_report.dart
index 53507de24aa62853153fd1e6bf02e346d09a78f2..b3a147b6c1194b81a3874354004a171f599877f2 100644
--- a/sdk/lib/_internal/pub/lib/src/solver/solve_report.dart
+++ b/sdk/lib/_internal/pub/lib/src/solver/solve_report.dart
@@ -215,26 +215,15 @@ class _SolveReport {
/// description.
bool _descriptionsEqual(PackageId a, PackageId b) {
if (a.source != b.source) return false;
-
- if (_sources.contains(a.source)) {
- var source = _sources[a.source];
- return source.descriptionsEqual(a.description, b.description);
- } else {
- // Unknown source, so just do a literal comparison.
- return a.description == b.description;
- }
+ return _sources[a.source].descriptionsEqual(a.description, b.description);
}
/// Writes a terse description of [id] (not including its name) to the output.
void _writeId(PackageId id) {
_output.write(id.version);
- var source = null;
- if (_sources.contains(id.source)) {
- source = _sources[id.source];
- }
-
- if (source != null && source != _sources.defaultSource) {
+ var source = _sources[id.source];
+ if (source != _sources.defaultSource) {
var description = source.formatDescription(_root.dir, id.description);
_output.write(" from ${id.source} $description");
}
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/solver/backtracking_solver.dart ('k') | sdk/lib/_internal/pub/lib/src/source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698