mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 11:14:25 +08:00
Use drop instead of splitAt since we only use the second half
This commit is contained in:
@@ -200,7 +200,7 @@ doReplace start end o r =
|
||||
let si = fromIntegral (start-1)
|
||||
ei = fromIntegral (end-1)
|
||||
(x, xs) = splitAt si o
|
||||
(y, z) = splitAt (ei - si) xs
|
||||
z = drop (ei - si) xs
|
||||
in
|
||||
x ++ r ++ z
|
||||
|
||||
|
Reference in New Issue
Block a user