From a705d021a8cfbb3b9bbfbec833302768d3ad459e Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 30 Apr 2020 19:56:45 +0530 Subject: Refactor the usage of hGetLineSafe hGetLineSafe is always hGetLine and hence we can directly use it. --- src/Xmobar/Plugins/StdinReader.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Xmobar/Plugins/StdinReader.hs') diff --git a/src/Xmobar/Plugins/StdinReader.hs b/src/Xmobar/Plugins/StdinReader.hs index 4b80044..5a8b2be 100644 --- a/src/Xmobar/Plugins/StdinReader.hs +++ b/src/Xmobar/Plugins/StdinReader.hs @@ -25,7 +25,6 @@ import System.IO import Control.Exception (SomeException(..), handle) import Xmobar.Run.Exec import Xmobar.X11.Actions (stripActions) -import Xmobar.System.Utils (hGetLineSafe) data StdinReader = StdinReader | UnsafeStdinReader deriving (Read, Show) @@ -33,7 +32,7 @@ data StdinReader = StdinReader | UnsafeStdinReader instance Exec StdinReader where start stdinReader cb = do s <- handle (\(SomeException e) -> do hPrint stderr e; return "") - (hGetLineSafe stdin) + (hGetLine stdin) cb $ escape stdinReader s eof <- isEOF if eof -- cgit v1.2.3