Skip to content

Commit

Permalink
chore: cargo-clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ynqa committed Nov 30, 2024
1 parent b9b3b7c commit 365f129
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion promkit/src/core/text_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl TextEditor {
let pos = self.position();
self.0
.contents_mut()
.replace_range(pos..pos + 1, &ch.to_string());
.replace_range(pos..pos + 1, ch.to_string());
self.forward();
}
}
Expand Down
2 changes: 1 addition & 1 deletion promkit/src/preset/checkbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl Checkbox {
/// # Arguments
///
/// * `items` - An iterator over items
/// that implement the `Display` trait, to be used as options.
/// that implement the `Display` trait, to be used as options.
pub fn new<T: Display, I: IntoIterator<Item = T>>(items: I) -> Self {
Self {
title_state: text::State {
Expand Down
2 changes: 1 addition & 1 deletion promkit/src/preset/listbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl Listbox {
/// # Arguments
///
/// * `items` - An iterator over items
/// that implement the `Display` trait, to be used as options.
/// that implement the `Display` trait, to be used as options.
pub fn new<T: Display, I: IntoIterator<Item = T>>(items: I) -> Self {
Self {
title_state: text::State {
Expand Down
6 changes: 3 additions & 3 deletions promkit/src/preset/query_selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ impl QuerySelector {
/// # Arguments
///
/// * `items` - An iterator over items that implement the `Display` trait,
/// to be used as options in the list box.
/// to be used as options in the list box.
/// * `filter` - A function that takes the current input
/// from the text editor and the list of items,
/// returning a filtered list of items to display.
/// from the text editor and the list of items,
/// returning a filtered list of items to display.
pub fn new<T, I>(items: I, filter: render::Filter) -> Self
where
T: Display,
Expand Down
12 changes: 6 additions & 6 deletions promkit/src/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ impl<T: ?Sized> ValidatorManager<T> {
/// # Arguments
///
/// * `validator` - A function that takes a reference
/// to an input of type `T` and returns a boolean
/// indicating whether the input passes the validation.
/// to an input of type `T` and returns a boolean
/// indicating whether the input passes the validation.
/// * `error_message_generator` - A function that takes a reference
/// to an input of type `T` and returns a `String`
/// that describes the validation error.
/// to an input of type `T` and returns a `String`
/// that describes the validation error.
///
/// # Returns
///
Expand All @@ -47,7 +47,7 @@ impl<T: ?Sized> ValidatorManager<T> {
/// # Arguments
///
/// * `input` - A reference
/// to the input of type `T` to be validated.
/// to the input of type `T` to be validated.
///
/// # Returns
///
Expand All @@ -63,7 +63,7 @@ impl<T: ?Sized> ValidatorManager<T> {
/// # Arguments
///
/// * `input` - A reference to the input of type `T`
/// for which to generate an error message.
/// for which to generate an error message.
///
/// # Returns
///
Expand Down

0 comments on commit 365f129

Please sign in to comment.