From 6c705f09e88a4b63c4ed854bc9e956b0539ca8af Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Sun, 9 May 2021 17:13:59 +0900 Subject: Lint --- helix-core/src/selection.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'helix-core') diff --git a/helix-core/src/selection.rs b/helix-core/src/selection.rs index dfd95bdd..67a20934 100644 --- a/helix-core/src/selection.rs +++ b/helix-core/src/selection.rs @@ -210,7 +210,7 @@ impl Selection { Self::single(pos, pos) } - fn normalize(mut ranges: SmallVec<[Range; 1]>, mut primary_index: usize) -> Selection { + fn normalize(mut ranges: SmallVec<[Range; 1]>, mut primary_index: usize) -> Self { let primary = ranges[primary_index]; ranges.sort_unstable_by_key(Range::from); primary_index = ranges.iter().position(|&range| range == primary).unwrap(); @@ -249,7 +249,7 @@ impl Selection { result.push(range) } - Selection { + Self { ranges: result, primary_index, } -- cgit v1.2.3-70-g09d2