Skip to content

Commit

Permalink
chore: robustify for byAsSorry (#892)
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em authored Jul 26, 2024
1 parent d2b1546 commit e789780
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Batteries/CodeAction/Deprecated.lean
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def deprecatedCodeActionProvider : CodeActionProvider := fun params snap => do
for m in snap.msgLog.toList do
if m.data.isDeprecationWarning then
if h : _ then
msgs := msgs.push (snap.cmdState.messages.toList[i])
msgs := msgs.push (snap.cmdState.messages.toList[i]'h)
i := i + 1
if msgs.isEmpty then return #[]
let start := doc.meta.text.lspPosToUtf8Pos params.range.start
Expand Down
2 changes: 1 addition & 1 deletion Batteries/Data/List/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ theorem modifyNth_eq_take_drop (f : α → α) :
∀ n l, modifyNth f n l = take n l ++ modifyHead f (drop n l) :=
modifyNthTail_eq_take_drop _ rfl

theorem modifyNth_eq_take_cons_drop (f : α → α) {n l} (h) :
theorem modifyNth_eq_take_cons_drop (f : α → α) {n l} (h : n < length l) :
modifyNth f n l = take n l ++ f l[n] :: drop (n + 1) l := by
rw [modifyNth_eq_take_drop, drop_eq_getElem_cons h]; rfl

Expand Down

0 comments on commit e789780

Please sign in to comment.