mirror of
https://github.com/ratatui/ratatui.git
synced 2025-09-29 22:11:34 +00:00
refactor: needless_pass_by_ref_mut (#1137)
<https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut>
This commit is contained in:
parent
35941809e1
commit
8a60a561c9
@ -88,6 +88,7 @@ map_err_ignore = "warn"
|
|||||||
missing_const_for_fn = "warn"
|
missing_const_for_fn = "warn"
|
||||||
mixed_read_write_in_expression = "warn"
|
mixed_read_write_in_expression = "warn"
|
||||||
mod_module_files = "warn"
|
mod_module_files = "warn"
|
||||||
|
needless_pass_by_ref_mut = "warn"
|
||||||
needless_raw_strings = "warn"
|
needless_raw_strings = "warn"
|
||||||
redundant_type_annotations = "warn"
|
redundant_type_annotations = "warn"
|
||||||
rest_pat_in_fully_bound_structs = "warn"
|
rest_pat_in_fully_bound_structs = "warn"
|
||||||
|
@ -86,7 +86,7 @@ impl App {
|
|||||||
///
|
///
|
||||||
/// Since each character in a string can be contain multiple bytes, it's necessary to calculate
|
/// Since each character in a string can be contain multiple bytes, it's necessary to calculate
|
||||||
/// the byte index based on the index of the character.
|
/// the byte index based on the index of the character.
|
||||||
fn byte_index(&mut self) -> usize {
|
fn byte_index(&self) -> usize {
|
||||||
self.input
|
self.input
|
||||||
.char_indices()
|
.char_indices()
|
||||||
.map(|(i, _)| i)
|
.map(|(i, _)| i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user