diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-12-05 15:00:50 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-12-05 15:00:50 -0400 |
commit | 236c467da19f34edb08f124e37fd26eb62c43fcf (patch) | |
tree | f4e488f77fb954812e4d48f399fc2ecab072afea /Command/EnableRemote.hs | |
parent | f013f71cb5d3f7eee3afb3eb8f01a33206d717c4 (diff) |
more lambda-case conversion
Diffstat (limited to 'Command/EnableRemote.hs')
-rw-r--r-- | Command/EnableRemote.hs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Command/EnableRemote.hs b/Command/EnableRemote.hs index d9993ebc9..e540473c5 100644 --- a/Command/EnableRemote.hs +++ b/Command/EnableRemote.hs @@ -68,8 +68,7 @@ startSpecialRemote :: Git.RemoteName -> Remote.RemoteConfig -> Maybe (UUID, Remo startSpecialRemote name config Nothing = do m <- Annex.SpecialRemote.specialRemoteMap confm <- Logs.Remote.readRemoteLog - v <- Remote.nameToUUID' name - case v of + Remote.nameToUUID' name >>= \case Right u | u `M.member` m -> startSpecialRemote name config $ Just (u, fromMaybe M.empty (M.lookup u confm)) @@ -91,8 +90,7 @@ performSpecialRemote t u oldc c gc = do cleanupSpecialRemote :: UUID -> R.RemoteConfig -> CommandCleanup cleanupSpecialRemote u c = do Logs.Remote.configSet u c - mr <- Remote.byUUID u - case mr of + Remote.byUUID u >>= \case Nothing -> noop Just r -> setRemoteIgnore (R.repo r) False return True |