Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clippy warnings #800

Merged
merged 1 commit into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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