Commit e151a1a4 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by Adam Barth

prefer_contains (#8040)

parent 60f5cbba
......@@ -125,9 +125,9 @@ Future<String> getDartVersion() async {
// Dart VM version: 1.17.0-dev.2.0 (Tue May 3 12:14:52 2016) on "macos_x64"
// to:
// 1.17.0-dev.2.0
if (version.indexOf('(') != -1)
if (version.contains('('))
version = version.substring(0, version.indexOf('(')).trim();
if (version.indexOf(':') != -1)
if (version.contains(':'))
version = version.substring(version.indexOf(':') + 1).trim();
return version.replaceAll('"', "'");
......
......@@ -127,7 +127,7 @@ class Daemon {
try {
String method = request['method'];
if (method.indexOf('.') == -1)
if (!method.contains('.'))
throw 'method not understood: $method';
String prefix = method.substring(0, method.indexOf('.'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment