From 15788df8c452a77b5c53e596426ffa87a936db3c Mon Sep 17 00:00:00 2001 From: gwenn Date: Sat, 31 Aug 2024 10:41:28 +0200 Subject: [PATCH] Fix clippy warnings --- src/completion.rs | 1 + src/highlight.rs | 2 -- src/validate.rs | 9 +++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/completion.rs b/src/completion.rs index f34befb4d..114d1aa9e 100644 --- a/src/completion.rs +++ b/src/completion.rs @@ -415,6 +415,7 @@ fn normalize(s: &str) -> Cow { /// Given a `line` and a cursor `pos`ition, /// try to find backward the start of a word. +/// /// Return (0, `line[..pos]`) if no break char has been found. /// Return the word and its start position (idx, `line[idx..pos]`) otherwise. #[must_use] diff --git a/src/highlight.rs b/src/highlight.rs index d5c0e8967..a21459e0a 100644 --- a/src/highlight.rs +++ b/src/highlight.rs @@ -5,8 +5,6 @@ use std::borrow::Cow::{self, Borrowed, Owned}; use std::cell::Cell; /// Syntax highlighter with [ANSI color](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters). -/// Rustyline will try to handle escape sequence for ANSI color on windows -/// when not supported natively (windows <10). /// /// Currently, the highlighted version *must* have the same display width as /// the original input. diff --git a/src/validate.rs b/src/validate.rs index e3bf2e247..12b7f3314 100644 --- a/src/validate.rs +++ b/src/validate.rs @@ -48,10 +48,11 @@ impl<'i> ValidationContext<'i> { } /// This trait provides an extension interface for determining whether -/// the current input buffer is valid. Rustyline uses the method -/// provided by this trait to decide whether hitting the enter key -/// will end the current editing session and return the current line -/// buffer to the caller of `Editor::readline` or variants. +/// the current input buffer is valid. +/// +/// Rustyline uses the method provided by this trait to decide whether hitting +/// the enter key will end the current editing session and return the current +/// line buffer to the caller of `Editor::readline` or variants. pub trait Validator { /// Takes the currently edited `input` and returns a /// `ValidationResult` indicating whether it is valid or not along