From cad0e1c8b7eb21f8dceca8dd9fa3bc1d1aa7eabd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 15 May 2011 02:49:43 -0400 Subject: simplified a bunch of Maybe handling --- Remote/Bup.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Remote/Bup.hs') diff --git a/Remote/Bup.hs b/Remote/Bup.hs index 0aaff06b2..d2b771bf7 100644 --- a/Remote/Bup.hs +++ b/Remote/Bup.hs @@ -68,9 +68,8 @@ gen r u c = do bupSetup :: UUID -> RemoteConfig -> Annex RemoteConfig bupSetup u c = do -- verify configuration is sane - let buprepo = case M.lookup "buprepo" c of - Nothing -> error "Specify buprepo=" - Just r -> r + let buprepo = maybe (error "Specify buprepo=") id $ + M.lookup "buprepo" c c' <- encryptionSetup c -- bup init will create the repository. -- cgit v1.2.3