From f7044a0193eaa741215c187dba07f437fa63272c Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Thu, 7 Dec 2023 00:42:21 +0100 Subject: [PATCH] :rotating_light: (swiftformat): --enable opaqueGenericParameters --- .swiftformat | 2 ++ Apps/LekaApp/Sources/Extensions/Extensions.swift | 4 ++-- Modules/GameEngineKit/Sources/_NewSystem/Utils/Utils.swift | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.swiftformat b/.swiftformat index c2fb6b1f1d..34eb4c2a0b 100644 --- a/.swiftformat +++ b/.swiftformat @@ -84,6 +84,8 @@ --hexliteralcase uppercase --exponentcase lowercase +--enable opaqueGenericParameters + # Disabled rules --disable blankLinesBetweenImports diff --git a/Apps/LekaApp/Sources/Extensions/Extensions.swift b/Apps/LekaApp/Sources/Extensions/Extensions.swift index 2e23a543f6..3e4db5a535 100644 --- a/Apps/LekaApp/Sources/Extensions/Extensions.swift +++ b/Apps/LekaApp/Sources/Extensions/Extensions.swift @@ -11,8 +11,8 @@ import SwiftUI // Fill & Stroke with 1 modifier extension Shape { - func fill( - _ fillStyle: Fill, strokeBorder strokeStyle: Stroke, lineWidth: CGFloat = 1 + func fill( + _ fillStyle: some ShapeStyle, strokeBorder strokeStyle: some ShapeStyle, lineWidth: CGFloat = 1 ) -> some View { self .stroke(strokeStyle, lineWidth: lineWidth) diff --git a/Modules/GameEngineKit/Sources/_NewSystem/Utils/Utils.swift b/Modules/GameEngineKit/Sources/_NewSystem/Utils/Utils.swift index 1e3d61e269..f35c29a406 100644 --- a/Modules/GameEngineKit/Sources/_NewSystem/Utils/Utils.swift +++ b/Modules/GameEngineKit/Sources/_NewSystem/Utils/Utils.swift @@ -34,8 +34,8 @@ extension View { } extension Shape { - func fill( - _ fillStyle: Fill, strokeBorder strokeStyle: Stroke, lineWidth: CGFloat = 1 + func fill( + _ fillStyle: some ShapeStyle, strokeBorder strokeStyle: some ShapeStyle, lineWidth: CGFloat = 1 ) -> some View { self .stroke(strokeStyle, lineWidth: lineWidth)