Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More cleanup #6209

Merged
merged 3 commits into from
Mar 29, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Simplify by collapsing a do block into a single <$>
  • Loading branch information
josephcsible committed Mar 25, 2020
commit e1ac201fffe08598d1e871d2ee2a8e54bdb84317
4 changes: 1 addition & 3 deletions test/Tests/Readers/Docx.hs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ testForWarningsWithOpts opts name docxFile expected =
-- testForWarnings = testForWarningsWithOpts defopts

getMedia :: FilePath -> FilePath -> IO (Maybe B.ByteString)
getMedia archivePath mediaPath = do
zf <- toArchive <$> B.readFile archivePath
return $ fromEntry <$> findEntryByPath ("word/" ++ mediaPath) zf
getMedia archivePath mediaPath = fmap fromEntry . findEntryByPath ("word/" ++ mediaPath) . toArchive <$> B.readFile archivePath
josephcsible marked this conversation as resolved.
Show resolved Hide resolved

compareMediaPathIO :: FilePath -> MediaBag -> FilePath -> IO Bool
compareMediaPathIO mediaPath mediaBag docxPath = do
Expand Down