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:
EdJoPaTo 2024-05-25 03:32:22 +02:00 committed by GitHub
parent 35941809e1
commit 8a60a561c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -88,6 +88,7 @@ map_err_ignore = "warn"
missing_const_for_fn = "warn"
mixed_read_write_in_expression = "warn"
mod_module_files = "warn"
needless_pass_by_ref_mut = "warn"
needless_raw_strings = "warn"
redundant_type_annotations = "warn"
rest_pat_in_fully_bound_structs = "warn"

View file

@ -86,7 +86,7 @@ impl App {
///
/// 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.
fn byte_index(&mut self) -> usize {
fn byte_index(&self) -> usize {
self.input
.char_indices()
.map(|(i, _)| i)