mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-27 12:22:36 +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)
|
let si = fromIntegral (start-1)
|
||||||
ei = fromIntegral (end-1)
|
ei = fromIntegral (end-1)
|
||||||
(x, xs) = splitAt si o
|
(x, xs) = splitAt si o
|
||||||
(y, z) = splitAt (ei - si) xs
|
z = drop (ei - si) xs
|
||||||
in
|
in
|
||||||
x ++ r ++ z
|
x ++ r ++ z
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user