diff --git a/promkit/src/core/text_editor.rs b/promkit/src/core/text_editor.rs index 61c3b402..acb9ed21 100644 --- a/promkit/src/core/text_editor.rs +++ b/promkit/src/core/text_editor.rs @@ -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(); } } diff --git a/promkit/src/preset/checkbox.rs b/promkit/src/preset/checkbox.rs index ab4c97f7..de4c6851 100644 --- a/promkit/src/preset/checkbox.rs +++ b/promkit/src/preset/checkbox.rs @@ -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>(items: I) -> Self { Self { title_state: text::State { diff --git a/promkit/src/preset/listbox.rs b/promkit/src/preset/listbox.rs index 4190b4c0..e27f8f79 100644 --- a/promkit/src/preset/listbox.rs +++ b/promkit/src/preset/listbox.rs @@ -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>(items: I) -> Self { Self { title_state: text::State { diff --git a/promkit/src/preset/query_selector.rs b/promkit/src/preset/query_selector.rs index cf5d0c29..a2c679a0 100644 --- a/promkit/src/preset/query_selector.rs +++ b/promkit/src/preset/query_selector.rs @@ -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(items: I, filter: render::Filter) -> Self where T: Display, diff --git a/promkit/src/validate.rs b/promkit/src/validate.rs index 6f62ba8e..fd84a5c3 100644 --- a/promkit/src/validate.rs +++ b/promkit/src/validate.rs @@ -25,11 +25,11 @@ impl ValidatorManager { /// # 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 /// @@ -47,7 +47,7 @@ impl ValidatorManager { /// # Arguments /// /// * `input` - A reference - /// to the input of type `T` to be validated. + /// to the input of type `T` to be validated. /// /// # Returns /// @@ -63,7 +63,7 @@ impl ValidatorManager { /// # 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 ///