refactor: hlint
This commit is contained in:
parent
80960f42c5
commit
4ea54d8b82
@ -132,7 +132,7 @@ respondFileConditional representationLastModified cType FileReference{..} = do
|
||||
respRange = case byteRange of
|
||||
ByteRangeSpecification f Nothing -> ByteRangeResponseSpecification (min (pred iLength) f) (pred iLength)
|
||||
ByteRangeSpecification f (Just t) -> ByteRangeResponseSpecification (min (pred iLength) f) (min (pred iLength) t)
|
||||
ByteRangeSuffixSpecification s -> ByteRangeResponseSpecification (iLength - (min (pred iLength) s)) (pred iLength)
|
||||
ByteRangeSuffixSpecification s -> ByteRangeResponseSpecification (iLength - min (pred iLength) s) (pred iLength)
|
||||
in ( do
|
||||
chunkVar <- newEmptyTMVarIO
|
||||
minioAsync <- lift . allocateLinkedAsync $
|
||||
@ -160,7 +160,7 @@ respondFileConditional representationLastModified cType FileReference{..} = do
|
||||
let (byteFrom, byteTo) = case byteRange of
|
||||
ByteRangeSpecification f Nothing -> (min (pred iLength) f, pred iLength)
|
||||
ByteRangeSpecification f (Just t) -> (min (pred iLength) f, min (pred iLength) t)
|
||||
ByteRangeSuffixSpecification s -> (iLength - (min (pred iLength) s), pred iLength)
|
||||
ByteRangeSuffixSpecification s -> (iLength - min (pred iLength) s, pred iLength)
|
||||
relevantChunks = view _2 $ foldl' go (0, []) dbManifest''
|
||||
where go :: (Natural, [(FileContentChunkReference, Natural, Natural)])
|
||||
-> (FileContentChunkReference, Natural)
|
||||
|
||||
@ -214,7 +214,7 @@ instance IsRangeUnit req resp => FromHttpApiData (RangeRequest req) where
|
||||
void . A.string $ rangeUnit (Proxy @req) (Proxy @resp)
|
||||
void $ A.char '='
|
||||
t <- A.takeText
|
||||
either (fail . unpack) return . fmap RangeRequest $ parseUrlPiece t
|
||||
either (fail . unpack) (return . RangeRequest) $ parseUrlPiece t
|
||||
|
||||
newtype RangeResponse resp = RangeResponse resp
|
||||
deriving (Generic, Typeable)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user