From 335c5b74c9ce42bcc6214d71b522c04fe6544889 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sun, 14 Feb 2021 16:32:36 -0500 Subject: [PATCH] REF clean up asks --- app/rofi-dev.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/rofi-dev.hs b/app/rofi-dev.hs index 5512302..4b0fcef 100644 --- a/app/rofi-dev.hs +++ b/app/rofi-dev.hs @@ -285,7 +285,7 @@ fstabToCIFS FSTabEntry{ fstabSpec = s, fstabDir = d, fstabOptions = o } = do -- the cifs mount call will prompt for a password and hang otherwise. pwd <- if M.member "guest" o then return Nothing - else Just . M.findWithDefault readPassword d <$> asks passwords + else asks $ Just . M.findWithDefault readPassword d . passwords let r = Removable { deviceSpec = smartSlashPrefix s, label = takeFileName d } return $ CIFS r d pwd where @@ -360,7 +360,7 @@ getVeracryptDevices :: RofiIO MountConf [VeraCrypt] getVeracryptDevices = mapM toDev =<< asks vcMounts where toDev (d, s) = do - pwd <- Just . M.findWithDefault readPassword d <$> asks passwords + pwd <- asks $ Just . M.findWithDefault readPassword d . passwords let r = Removable { deviceSpec = s, label = takeFileName d } return $ VeraCrypt r d pwd