aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/selection.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core/src/selection.rs')
-rw-r--r--helix-core/src/selection.rs11
1 files changed, 1 insertions, 10 deletions
diff --git a/helix-core/src/selection.rs b/helix-core/src/selection.rs
index 5f77d7ad..6ca798a6 100644
--- a/helix-core/src/selection.rs
+++ b/helix-core/src/selection.rs
@@ -11,15 +11,6 @@ use crate::{
use smallvec::{smallvec, SmallVec};
use std::borrow::Cow;
-#[inline]
-fn abs_difference(x: usize, y: usize) -> usize {
- if x < y {
- y - x
- } else {
- x - y
- }
-}
-
/// A single selection range.
///
/// The range consists of an "anchor" and "head" position in
@@ -367,7 +358,7 @@ impl Selection {
}
/// A convenience short-cut for `transform(|r| r.min_width_1(text))`.
- pub fn min_width_1(mut self, text: RopeSlice) -> Self {
+ pub fn min_width_1(self, text: RopeSlice) -> Self {
self.transform(|r| r.min_width_1(text))
}