Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a40db0d

Browse files
committed
Less T.pack / T.unpack
1 parent 098031a commit a40db0d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/GitHub/Request.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,11 +411,11 @@ makeHttpRequest auth r = case r of
411411
. setMethod (toMethod m)
412412
$ req
413413
where
414-
parseUrl' :: MonadThrow m => Text -> m HTTP.Request
415-
parseUrl' = HTTP.parseUrlThrow . T.unpack
414+
parseUrl' :: MonadThrow m => String -> m HTTP.Request
415+
parseUrl' = HTTP.parseUrlThrow
416416

417-
url :: Paths -> Text
418-
url paths = maybe "https://api.github.com" id (endpoint =<< auth) <> "/" <> T.pack (intercalate "/" paths') where
417+
url :: Paths -> String
418+
url paths = maybe "https://api.github.com" T.unpack (endpoint =<< auth) ++ "/" ++ intercalate "/" paths' where
419419
paths' = map (escapeURIString isUnescapedInURIComponent . T.unpack) paths
420420

421421
setReqHeaders :: HTTP.Request -> HTTP.Request

0 commit comments

Comments
 (0)