From 6156ed18fdaa94b54e0c95302a7602f1269f3b4c Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Mon, 22 Aug 2022 17:43:12 -0500 Subject: [PATCH] refactored naming Signed-off-by: Matt Bruce --- VDS/Protocols/Withable.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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