diff --git a/Sources/Yams/Parser.swift b/Sources/Yams/Parser.swift index 4ab11276..0c76e3ba 100644 --- a/Sources/Yams/Parser.swift +++ b/Sources/Yams/Parser.swift @@ -365,8 +365,7 @@ private extension Parser { } private func checkDuplicates(mappingKeys: [Node]) throws { - let duplicates: [Node: [Node]] = Dictionary(grouping: mappingKeys) { $0 } - .filter { $1.count > 1 } + let duplicates: [Node: [Node]] = Dictionary(grouping: mappingKeys) { $0 }.filter { $1.count > 1 } guard duplicates.isEmpty else { throw YamlError.duplicatedKeysInMapping(duplicates: duplicates, yaml: yaml) }