Don't return a Maybe

This commit is contained in:
Jeroen Engels 2023-04-08 22:04:40 +02:00
parent 248dc2b23f
commit 48a5b0ad41
2 changed files with 2 additions and 3 deletions

View File

@ -494,7 +494,6 @@ addReadme readme_ (ValidProject project) =
ValidProject { project | readme = Just ( readme_, ContentHash.hash readme_.content ) } ValidProject { project | readme = Just ( readme_, ContentHash.hash readme_.content ) }
addElmJson : { path : String, raw : String, project : Elm.Project.Project } -> ValidProject -> Maybe ValidProject addElmJson : { path : String, raw : String, project : Elm.Project.Project } -> ValidProject -> ValidProject
addElmJson elmJson_ (ValidProject project) = addElmJson elmJson_ (ValidProject project) =
ValidProject { project | elmJson = Just ( elmJson_, ContentHash.hash elmJson_.raw ) } ValidProject { project | elmJson = Just ( elmJson_, ContentHash.hash elmJson_.raw ) }
|> Just

View File

@ -5120,7 +5120,7 @@ findFixHelp project fixablePredicate errors maybeModuleZipper =
Just elmJson -> Just elmJson ->
case case
InternalFix.fixElmJson fixes elmJson.raw InternalFix.fixElmJson fixes elmJson.raw
|> Maybe.andThen |> Maybe.map
(\fixResult -> (\fixResult ->
ValidProject.addElmJson { path = elmJson.path, raw = fixResult.raw, project = fixResult.project } project ValidProject.addElmJson { path = elmJson.path, raw = fixResult.raw, project = fixResult.project } project
) )