@@ -2125,20 +2125,16 @@ fn reset_diff_change(
21252125 let scrolloff = editor.config().scrolloff;
21262126
21272127 let (view, doc) = current!(editor);
2128− // TODO refactor to use let..else once MSRV is raised to 1.65
2129− let handle = match doc.diff_handle() {
2130− Some(handle) => handle,
2131− None => bail!("Diff is not available in the current buffer"),
2128+ let Some(handle) = doc.diff_handle() else {
2129+ bail!("Diff is not available in the current buffer")
21322130 };
21332131
21342132 let diff = handle.load();
21352133 let doc_text = doc.text().slice(..);
21362134 let line = doc.selection(view.id).primary().cursor_line(doc_text);
21372135
2138− // TODO refactor to use let..else once MSRV is raised to 1.65
2139− let hunk_idx = match diff.hunk_at(line as u32, true) {
2140− Some(hunk_idx) => hunk_idx,
2141− None => bail!("There is no change at the cursor"),
2136+ let Some(hunk_idx) = diff.hunk_at(line as u32, true) else {
2137+ bail!("There is no change at the cursor")
21422138 };
21432139 let hunk = diff.nth_hunk(hunk_idx);
21442140 let diff_base = diff.diff_base();