Fix a redundant conformance constraint warning in ForEachStore (#738)

The warning was:

    Sources/ComposableArchitecture/SwiftUI/ForEachStore.swift:141:28: warning: redundant conformance constraint 'EachContent' : 'View'
      public init<EachContent: View>(
                               ^
    Sources/ComposableArchitecture/SwiftUI/ForEachStore.swift:146:16: note: conformance constraint 'EachContent' : 'View' implied here
        EachContent: View,
                   ^

I fixed the warning by removing the redundant constraint from the type
parameter.
This commit is contained in:
Adam Roben
2021-08-23 14:03:39 -04:00
committed by GitHub
parent 575d7c0d59
commit d4b438a61f

View File

@@ -82,7 +82,7 @@ where Data: Collection, ID: Hashable, Content: View {
/// - Parameters:
/// - store: A store on an identified array of data and an identified action.
/// - content: A function that can generate content given a store of an element.
public init<EachContent: View>(
public init<EachContent>(
_ store: Store<IdentifiedArray<ID, EachState>, (ID, EachAction)>,
@ViewBuilder content: @escaping (Store<EachState, EachAction>) -> EachContent
)