diff --git a/src/Tahoe/Download.hs b/src/Tahoe/Download.hs index 11e1105a86b2275857314dcba39260f1d9f39c40..b899710acbc6f52e8ea1a17067af5e5db6a529d5 100644 --- a/src/Tahoe/Download.hs +++ b/src/Tahoe/Download.hs @@ -74,6 +74,6 @@ discoverShares :: -- | The share numbers the server claims to have. IO (Either DiscoverError [ShareNum]) discoverShares _storageIndex ann - | Nothing == storageServerAnnouncementFURL ann = + | isNothing $ storageServerAnnouncementFURL ann = pure $ Left StorageServerLocationUnknown | otherwise = pure $ Right [] diff --git a/test/Spec.hs b/test/Spec.hs index 956850d568905c1965be19b8227068e3a568ff90..450c9bc88b01ae4ede47b7c1bf8b39669a886bb7 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -8,12 +8,10 @@ import Data.Word (Word16) import System.IO (hSetEncoding, stderr, stdout, utf8) import Tahoe.CHK.Capability (Reader (..), Verifier (..)) import Tahoe.CHK.Server (StorageServerAnnouncement (..)) -import Tahoe.Download (DownloadError (..)) +import Tahoe.Download (DownloadError (..), download) import Test.Tasty (TestTree, defaultMain, testGroup) import Test.Tasty.HUnit (assertEqual, testCase) -import Tahoe.Download (download) - tests :: TestTree tests = testGroup