Skip to content

Commit

Permalink
Enable 'Use unless' hint.
Browse files Browse the repository at this point in the history
  • Loading branch information
chungyc authored and blackgnezdo committed Oct 4, 2024
1 parent 24276fe commit 3e4dbbf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion .hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@
- ignore: {name: "Use maybe"} # 1 hint
- ignore: {name: "Use newtype instead of data"} # 1 hint
- ignore: {name: "Use replicate"} # 1 hint
- ignore: {name: "Use unless"} # 1 hint
4 changes: 2 additions & 2 deletions proto-lens-setup/src/Data/ProtoLens/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module Data.ProtoLens.Setup
, generateProtos
) where

import Control.Monad (filterM, forM_, when)
import Control.Monad (filterM, forM_, unless, when)
import qualified Data.ByteString as BS
import qualified Data.Map as Map
import Data.Maybe (maybeToList)
Expand Down Expand Up @@ -274,7 +274,7 @@ copyIfDifferent sourcePath targetPath = do
targetContents <- BS.readFile targetPath
return (sourceContents == targetContents)
-- Do the move if necessary.
when (not identical) $ do
unless identical $ do
createDirectoryIfMissing True (takeDirectory targetPath)
copyFile sourcePath targetPath

Expand Down

0 comments on commit 3e4dbbf

Please sign in to comment.