mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-27 00:36:02 +08:00
Use maybe instead of fromMaybe and fmap
This commit is contained in:
@@ -829,7 +829,7 @@ lookupStack' functionOnly get dep def ctx key = do
|
||||
f (s:rest) = do
|
||||
-- Go up the stack until we find the value, and add
|
||||
-- a dependency on each state (including where it was found)
|
||||
res <- fromMaybe (f rest) (return <$> get (stackState s) key)
|
||||
res <- maybe (f rest) return (get (stackState s) key)
|
||||
modifySTRef (dependencies s) $ S.insert $ dep key res
|
||||
return res
|
||||
|
||||
|
Reference in New Issue
Block a user