Skip to content

Conversation

@mirao
Copy link

@mirao mirao commented Mar 30, 2022

Found by clippy.

E.g. for

self.highlight_primary_keywords(&mut index, &opts, &chars)

you get this warning

warning: this expression borrows a reference (`&filetype::HighlightingOptions`) that is immediately dereferenced by the compiler
   --> src/row.rs:447:64
    |
447 |                 || self.highlight_primary_keywords(&mut index, &opts, &chars)
    |                                                                ^^^^^ help: change this to: `opts`
    |

which is true, because opts is already a reference to &HighlightingOptions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant