Remove excess filtering

This commit is contained in:
Jeroen Engels 2023-06-02 16:26:53 +02:00
parent 2af4f864cf
commit 5a30c8495d

View File

@ -1173,8 +1173,8 @@ compactProjectDataVisitors getData maybeVisitor =
compactArbitraryFilesVisitor : Maybe ( List { a | path : String } -> moduleContext -> moduleContext, List String ) -> Maybe (List { a | path : String } -> moduleContext -> ( List nothing, moduleContext ))
compactArbitraryFilesVisitor maybeArbitraryFilesVisitor =
case maybeArbitraryFilesVisitor of
Just ( arbitraryFilesVisitor, requestedFiles ) ->
Just (\files moduleContext -> ( [], arbitraryFilesVisitor (List.filter (globMatch requestedFiles) files) moduleContext ))
Just ( arbitraryFilesVisitor, _ ) ->
Just (\files moduleContext -> ( [], arbitraryFilesVisitor files moduleContext ))
Nothing ->
Nothing