diff --git a/VDS/Protocols/Withable.swift b/VDS/Protocols/Withable.swift index ec5d3936..62af68ab 100644 --- a/VDS/Protocols/Withable.swift +++ b/VDS/Protocols/Withable.swift @@ -37,12 +37,12 @@ public protocol Withable { /// Provides a closure to configure instances inline. /// - Parameter closure: A closure with a mutable copy of `self` as the argument. /// - Returns: Simply returns the mutated copy of the instance after called the `closure`. - @discardableResult func with(_ closure: (_ instance: inout T) -> Void) -> T + @discardableResult func copyWith(_ closure: (_ instance: inout T) -> Void) -> T } public extension Withable { - @discardableResult func with(_ closure: (_ instance: inout Self) -> Void) -> Self { + @discardableResult func copyWith(_ closure: (_ instance: inout Self) -> Void) -> Self { var copy = self closure(©) return copy