From 230248bbc3e453bab339cb865990c3fa2f518311 Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Thu, 1 Jul 2021 19:40:37 -0700 Subject: [PATCH] Fix a couple additional `unused` warnings after merge. --- helix-core/src/selection.rs | 11 +---------- 1 file changed, 1 insertion(+), 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)) }