             let startLine = file.line(for: token.offset, startFrom: 0)
             let endLine = file.line(for: token.offset + token.length, startFrom: startLine)
 
-            for lineNumber in startLine...endLine {
-                result.update(with: lineNumber)
-            }
+            result.formUnion(Set(startLine...endLine))
         }
         return result
     }

        let varLines = varLetLineNumbers(file: file, structure: file.structure.dictionary.substructure)
        let commentLines = commentLineNumbers(file: file)
        var violations = [StyleViolation]()
        let notWhitespace = CharacterSet.whitespaces.inverted

        for (index, line) in file.lines.enumerated() {
            guard !varLines.contains(index) &&
                  !commentLines.contains(index) else {
                continue
            }

            let lastRange = line.content.rangeOfCharacter(from: notWhitespace, options: [.backwards])
            let firstRange = line.content.rangeOfCharacter(from: notWhitespace)

            // Precedes var/let and has text not ending with {
            if linePrecedesVar(index, varLines, commentLines) {
                if let last = lastRange.map({ line.content.substring(with: $0) }), last != "{" {
                    violated(&violations, file, index)
                }
            }
            // Follows var/let and has text not starting with }
            if lineFollowsVar(index, varLines, commentLines) {
                if let first = firstRange.map({ line.content.substring(with: $0) }), first != "}" {
                    violated(&violations, file, index)
                }
            }

        return 0
    }
}
