on master help sign in
Fix a couple additional `unused` warnings after merge.
230248bNathan Vegdahl
helix-core/src/selection.rs+1−10
@@ -11,15 +11,6 @@ use crate::{
11use smallvec::{smallvec, SmallVec};
11use smallvec::{smallvec, SmallVec};
12use std::borrow::Cow;
12use std::borrow::Cow;
13
13
14−#[inline]
15−fn abs_difference(x: usize, y: usize) -> usize {
16− if x < y {
17− y - x
18− } else {
19− x - y
20− }
21−}
22−
23/// A single selection range.
14/// A single selection range.
24///
15///
25/// The range consists of an "anchor" and "head" position in
16/// The range consists of an "anchor" and "head" position in
@@ -367,7 +358,7 @@ impl Selection {
367 }
358 }
368
359
369 /// A convenience short-cut for `transform(|r| r.min_width_1(text))`.
360 /// A convenience short-cut for `transform(|r| r.min_width_1(text))`.
370− pub fn min_width_1(mut self, text: RopeSlice) -> Self {
361+ pub fn min_width_1(self, text: RopeSlice) -> Self {
371 self.transform(|r| r.min_width_1(text))
362 self.transform(|r| r.min_width_1(text))
372 }
363 }
373
364