Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
gwenn committed Aug 31, 2024
1 parent e4eca97 commit 15788df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ fn normalize(s: &str) -> Cow<str> {

/// 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]
Expand Down
2 changes: 0 additions & 2 deletions src/highlight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 5 additions & 4 deletions src/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 15788df

Please sign in to comment.