aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/Cargo.toml2
-rw-r--r--helix-term/src/commands.rs5
-rw-r--r--helix-term/src/ui/document.rs13
3 files changed, 4 insertions, 16 deletions
diff --git a/helix-term/Cargo.toml b/helix-term/Cargo.toml
index 975d0871..b1d63a04 100644
--- a/helix-term/Cargo.toml
+++ b/helix-term/Cargo.toml
@@ -10,7 +10,7 @@ repository = "https://github.com/helix-editor/helix"
homepage = "https://helix-editor.com"
include = ["src/**/*", "README.md"]
default-run = "hx"
-rust-version = "1.57"
+rust-version = "1.65"
[features]
default = ["git"]
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index fb55ca2a..7b9b5943 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -3061,10 +3061,7 @@ fn goto_next_change_impl(cx: &mut Context, direction: Direction) {
.prev_hunk(cursor_line)
.map(|idx| idx.saturating_sub(count)),
};
- // TODO refactor with let..else once MSRV reaches 1.65
- let hunk_idx = if let Some(hunk_idx) = hunk_idx {
- hunk_idx
- } else {
+ let Some(hunk_idx) = hunk_idx else {
return range;
};
let hunk = hunks.nth_hunk(hunk_idx);
diff --git a/helix-term/src/ui/document.rs b/helix-term/src/ui/document.rs
index 4f615f7b..28a52f74 100644
--- a/helix-term/src/ui/document.rs
+++ b/helix-term/src/ui/document.rs
@@ -202,10 +202,7 @@ pub fn render_text<'t>(
// formattter.line_pos returns to line index of the next grapheme
// so it must be called before formatter.next
let doc_line = formatter.line_pos();
- // TODO refactor with let .. else once MSRV reaches 1.65
- let (grapheme, mut pos) = if let Some(it) = formatter.next() {
- it
- } else {
+ let Some((grapheme, mut pos)) = formatter.next() else {
let mut last_pos = formatter.visual_pos();
if last_pos.row >= row_off {
last_pos.col -= 1;
@@ -226,7 +223,6 @@ pub fn render_text<'t>(
// skip any graphemes on visual lines before the block start
if pos.row < row_off {
if char_pos >= style_span.1 {
- // TODO refactor using let..else once MSRV reaches 1.65
style_span = if let Some(style_span) = styles.next() {
style_span
} else {
@@ -266,12 +262,7 @@ pub fn render_text<'t>(
// aquire the correct grapheme style
if char_pos >= style_span.1 {
- // TODO refactor using let..else once MSRV reaches 1.65
- style_span = if let Some(style_span) = styles.next() {
- style_span
- } else {
- (Style::default(), usize::MAX)
- }
+ style_span = styles.next().unwrap_or((Style::default(), usize::MAX));
}
char_pos += grapheme.doc_chars();