Skip to content

Commit

Permalink
use eraseIdxIfInBounds
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em committed Nov 21, 2024
1 parent 13b4529 commit 5797528
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Mathlib/Tactic/Linter/PPRoundtrip.lean
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def polishSource (s : String) : String × Array Nat :=
let preWS := split.foldl (init := #[]) fun p q =>
let txt := q.trimLeft.length
(p.push (q.length - txt)).push txt
let preWS := preWS.eraseIdx! 0
let preWS := preWS.eraseIdxIfInBounds 0
let s := (split.map .trimLeft).filter (· != "")
(" ".intercalate (s.filter (!·.isEmpty)), preWS)

Expand Down

0 comments on commit 5797528

Please sign in to comment.