summaryrefslogtreecommitdiff
path: root/Command/Whereis.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Whereis.hs')
-rw-r--r--Command/Whereis.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Command/Whereis.hs b/Command/Whereis.hs
index d4d268d93..eb6ea7c56 100644
--- a/Command/Whereis.hs
+++ b/Command/Whereis.hs
@@ -46,9 +46,9 @@ perform remotemap key = do
untrustedheader = "The following untrusted locations may also have copies:\n"
performRemote :: Key -> Remote -> Annex ()
-performRemote key remote = case whereisKey remote of
- Nothing -> return ()
- Just a -> do
- ls <- a key
- unless (null ls) $ showLongNote $
- unlines $ map (\l -> name remote ++ ": " ++ l) ls
+performRemote key remote = maybe noop go $ whereisKey remote
+ where
+ go a = do
+ ls <- a key
+ unless (null ls) $ showLongNote $ unlines $
+ map (\l -> name remote ++ ": " ++ l) ls