Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/text_edit/src/lib.rs')
-rw-r--r--crates/text_edit/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/text_edit/src/lib.rs b/crates/text_edit/src/lib.rs
index 1a6add0578..bd3fcb870a 100644
--- a/crates/text_edit/src/lib.rs
+++ b/crates/text_edit/src/lib.rs
@@ -101,7 +101,7 @@ impl TextEdit {
max_total_len = max(max_total_len, total_len);
}
- if let Some(additional) = max_total_len.checked_sub(text_size.into()) {
+ if let Some(additional) = max_total_len.checked_sub(text_size) {
text.reserve(additional.into());
}