Skip to content

Commit

Permalink
Use utf8.count instead of utf16.count to byte range
Browse files Browse the repository at this point in the history
  • Loading branch information
norio-nomura committed Oct 4, 2016
1 parent 33c29c1 commit d3e556d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/SwiftLintFramework/Rules/ExplicitInitRule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public struct ExplicitInitRule: ASTRule, ConfigurationProviderRule, CorrectableR
&& initializerWithType.numberOfMatchesInString(name, options: [], range: range) != 0
}

let length = ".init".utf16.count
let length = ".init".utf8.count

guard kind == .expr_call,
let name = dictionary["key.name"] as? String where isExpected(name),
Expand Down

0 comments on commit d3e556d

Please sign in to comment.