From 00c357b3916f42ded055543598e25e482d802282 Mon Sep 17 00:00:00 2001 From: Gabriel Dinner-David Date: Wed, 21 Dec 2022 23:08:51 -0500 Subject: [PATCH] fix clippy --- helix-term/src/commands.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 8a13fda64bd55..7042e7f8a5af3 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -4033,15 +4033,14 @@ pub fn completion(cx: &mut Context) { } // comments -fn toggle_comments_impl( - cx: &mut Context, - comment_type: fn( - token: Option<&str>, - tokens: Option<(&str, &str)>, - text: RopeSlice, - selection: &Selection, - ) -> comment::CommentType, -) { +type CommentTypeFn = fn( + token: Option<&str>, + tokens: Option<(&str, &str)>, + text: RopeSlice, + selection: &Selection, +) -> comment::CommentType; + +fn toggle_comments_impl(cx: &mut Context, comment_type: CommentTypeFn) { let (view, doc) = current!(cx.editor); let token: Option<&str> = doc .language_config()