Skip to content
Snippets Groups Projects
Commit 37dfcacb authored by Iustin Pop's avatar Iustin Pop
Browse files

Replace custom strip newlines in UUID generation


Since now rStripSpace lives in Utils.hs, we can use it directly (as
UUIDs shouldn't contain spaces anyway).

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
parent 04063ba7
No related branches found
No related tags found
No related merge requests found
...@@ -285,5 +285,4 @@ rStripSpace = reverse . dropWhile isSpace . reverse ...@@ -285,5 +285,4 @@ rStripSpace = reverse . dropWhile isSpace . reverse
newUUID :: IO String newUUID :: IO String
newUUID = do newUUID = do
contents <- readFile C.randomUuidFile contents <- readFile C.randomUuidFile
let stripNewlines = reverse . dropWhile (=='\n') . reverse return $! rStripSpace $ take 128 contents
return $! stripNewlines $ take 128 contents
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment