diff options
Diffstat (limited to 'Backend.hs')
-rw-r--r-- | Backend.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Backend.hs b/Backend.hs index 0bb9f4b57..75327de80 100644 --- a/Backend.hs +++ b/Backend.hs @@ -122,8 +122,7 @@ lookupBackendName s = fromMaybe unknown $ maybeLookupBackendName s where unknown = error $ "unknown backend " ++ s maybeLookupBackendName :: String -> Maybe (Backend Annex) -maybeLookupBackendName s = - if 1 /= length matches - then Nothing - else Just $ head matches +maybeLookupBackendName s + | length matches == 1 = Just $ head matches + | otherwise = Nothing where matches = filter (\b -> s == B.name b) list |