improve readability and fix a warning

This commit is contained in:
Joey Hess 2020-12-14 17:48:30 -04:00
parent 8b248d84fb
commit 9de5506f19
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -72,10 +72,11 @@ checkMatcher :: FileMatcher Annex -> Maybe Key -> AssociatedFile -> AssumeNotPre
checkMatcher matcher mkey afile notpresent notconfigured d checkMatcher matcher mkey afile notpresent notconfigured d
| isEmpty matcher = notconfigured | isEmpty matcher = notconfigured
| otherwise = case (mkey, afile) of | otherwise = case (mkey, afile) of
(mkey, AssociatedFile (Just file)) -> (_, AssociatedFile (Just file)) ->
go =<< fileMatchInfo file mkey go =<< fileMatchInfo file mkey
(Just key, _) -> go (MatchingKey key afile) (Just key, AssociatedFile Nothing) ->
_ -> d go (MatchingKey key afile)
(Nothing, _) -> d
where where
go mi = checkMatcher' matcher mi notpresent go mi = checkMatcher' matcher mi notpresent