parsePOSIXTime ByteString conversion
Some easy (though tiny) speed wins. Sponsored-by: Luke T. Shumaker on Patreon
This commit is contained in:
parent
d3de3c28eb
commit
77e9781ae2
13 changed files with 22 additions and 16 deletions
|
@ -21,6 +21,7 @@ import qualified Annex
|
|||
import Utility.TimeStamp
|
||||
|
||||
import Data.ByteString.Builder
|
||||
import qualified Data.ByteString as B
|
||||
import qualified Data.Attoparsec.ByteString.Lazy as A
|
||||
|
||||
currentVectorClock :: Annex CandidateVectorClock
|
||||
|
@ -76,7 +77,7 @@ formatVectorClock (VectorClock t) = show t
|
|||
buildVectorClock :: VectorClock -> Builder
|
||||
buildVectorClock = string7 . formatVectorClock
|
||||
|
||||
parseVectorClock :: String -> Maybe VectorClock
|
||||
parseVectorClock :: B.ByteString -> Maybe VectorClock
|
||||
parseVectorClock t = VectorClock <$> parsePOSIXTime t
|
||||
|
||||
vectorClockParser :: A.Parser VectorClock
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue