diff --git a/Sources/Yams/Constructor.swift b/Sources/Yams/Constructor.swift index 80658b4..0a04480 100644 --- a/Sources/Yams/Constructor.swift +++ b/Sources/Yams/Constructor.swift @@ -441,7 +441,6 @@ extension Array { return sequence.map(sequence.tag.constructor.any) } - /// Construct an "O-map" (array of `(Any, Any)` tuples) from the specified `sequence`. /// /// - parameter sequence: Sequence to convert to `Array<(Any, Any)>`. diff --git a/Sources/Yams/Node.Mapping.swift b/Sources/Yams/Node.Mapping.swift index da95eee..94b7386 100644 --- a/Sources/Yams/Node.Mapping.swift +++ b/Sources/Yams/Node.Mapping.swift @@ -155,8 +155,7 @@ extension Node.Mapping { /// Set or get the specified `Node`. public subscript(node: Node) -> Node? { get { - let v = pairs.reversed().first(where: { $0.key == node }) - return v?.value + return pairs.reversed().first(where: { $0.key == node })?.value } set { if let newValue = newValue {