diff --git a/Example/ExampleTests/ViewModel/GradientActivityIndicatorViewModelTestCase.swift b/Example/ExampleTests/ViewModel/GradientActivityIndicatorViewModelTestCase.swift index 76a1e2e..f8cab7f 100644 --- a/Example/ExampleTests/ViewModel/GradientActivityIndicatorViewModelTestCase.swift +++ b/Example/ExampleTests/ViewModel/GradientActivityIndicatorViewModelTestCase.swift @@ -150,7 +150,7 @@ final class GradientActivityIndicatorViewModelTestCase: XCTestCase { } // Then - let expectedGradientLayerColors = [UIColor.red, .yellow, .green, .yellow, .red, .yellow, .green].map { $0.cgColor } + let expectedGradientLayerColors = [UIColor.red, .yellow, .green, .yellow, .red, .yellow, .green].map(\.cgColor) XCTAssertEqual(receivedGradientLayerColors, expectedGradientLayerColors) } diff --git a/GradientLoadingBar/Feature/GradientActivityIndicatorView/GradientActivityIndicatorViewModel.swift b/GradientLoadingBar/Feature/GradientActivityIndicatorView/GradientActivityIndicatorViewModel.swift index 8c3706f..4c260cd 100644 --- a/GradientLoadingBar/Feature/GradientActivityIndicatorView/GradientActivityIndicatorViewModel.swift +++ b/GradientLoadingBar/Feature/GradientActivityIndicatorView/GradientActivityIndicatorViewModel.swift @@ -121,7 +121,7 @@ extension Array where Element == UIColor { /// /// func infiniteLayerColors() -> [CGColor] { - let cgColors = map { $0.cgColor } + let cgColors = map(\.cgColor) // Simulate infinite animation - Therefore we'll reverse the colors and remove the first and last item // to prevent duplicate values at the "inner edges" destroying the infinite look.