1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00

Use the deleting/inserting helpers.

This commit is contained in:
Rob Rix 2017-05-26 15:05:33 -04:00
parent e1d8a98b22
commit 4e131c84d9

View File

@ -46,8 +46,8 @@ diffBlobPair decorator blobs = do
terms <- Async.mapConcurrently (parseBlob decorator) blobs
pure $ case (runJoin blobs, runJoin terms) of
((left, right), (a, b)) | nonExistentBlob left && nonExistentBlob right -> Nothing
| nonExistentBlob right -> Just . pure $ Delete a
| nonExistentBlob left -> Just . pure $ Insert b
| nonExistentBlob right -> Just $ deleting a
| nonExistentBlob left -> Just $ inserting b
| otherwise -> Just $ runDiff (both a b)
where
runDiff terms = runBothWith diffTerms terms