From 0a293560ab9d7e5ed32fc24762522e73518ec962 Mon Sep 17 00:00:00 2001 From: Jeroen Engels Date: Sat, 30 Nov 2024 18:46:37 +0100 Subject: [PATCH] Extract variable --- src/Review/Rule.elm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Review/Rule.elm b/src/Review/Rule.elm index 720346c4..2baeb31b 100644 --- a/src/Review/Rule.elm +++ b/src/Review/Rule.elm @@ -5860,11 +5860,13 @@ findFixHelp project fixablePredicate errors accErrors maybeModuleZipper = fixResultErr -> fixResultErr + + appliedFixes : Result (Error {}) { project : ValidProject, fixedFile : FixedFile } + appliedFixes = + applyFix project maybeModuleZipper err firstFix + |> Result.andThen (\fixResult -> applyFixes restOfFixes fixResult) in - case - applyFix project maybeModuleZipper err firstFix - |> Result.andThen (\fixResult -> applyFixes restOfFixes fixResult) - of + case appliedFixes of Ok fixResult -> FoundFixHelp (errors ++ accErrors) { project = fixResult.project, fixedFile = fixResult.fixedFile, error = errorToReviewError err }