summaryrefslogtreecommitdiff
path: root/Remote/Rsync.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-05-15 02:49:43 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-05-15 03:38:08 -0400
commitcad0e1c8b7eb21f8dceca8dd9fa3bc1d1aa7eabd (patch)
treeb6be12dc1cc83a35ca7d89a862d85e6d71c38572 /Remote/Rsync.hs
parentefa7f544050c0d5be6bc1b0fc0125278e475c213 (diff)
simplified a bunch of Maybe handling
Diffstat (limited to 'Remote/Rsync.hs')
-rw-r--r--Remote/Rsync.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index 682c96174..c15ab37a7 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -82,9 +82,8 @@ genRsyncOpts r = do
rsyncSetup :: UUID -> RemoteConfig -> Annex RemoteConfig
rsyncSetup u c = do
-- verify configuration is sane
- let url = case M.lookup "rsyncurl" c of
- Nothing -> error "Specify rsyncurl="
- Just d -> d
+ let url = maybe (error "Specify rsyncurl=") id $
+ M.lookup "rsyncurl" c
c' <- encryptionSetup c
-- The rsyncurl is stored in git config, not only in this remote's