Fix clippy::needless_borrow lint violations (#36444)
Release Notes: - N/A
This commit is contained in:
parent
eecf142f06
commit
9e0e233319
242 changed files with 801 additions and 821 deletions
|
@ -716,7 +716,7 @@ impl EditPreview {
|
|||
&self.applied_edits_snapshot,
|
||||
&self.syntax_snapshot,
|
||||
None,
|
||||
&syntax_theme,
|
||||
syntax_theme,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -727,7 +727,7 @@ impl EditPreview {
|
|||
¤t_snapshot.text,
|
||||
¤t_snapshot.syntax,
|
||||
Some(deletion_highlight_style),
|
||||
&syntax_theme,
|
||||
syntax_theme,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -737,7 +737,7 @@ impl EditPreview {
|
|||
&self.applied_edits_snapshot,
|
||||
&self.syntax_snapshot,
|
||||
Some(insertion_highlight_style),
|
||||
&syntax_theme,
|
||||
syntax_theme,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -749,7 +749,7 @@ impl EditPreview {
|
|||
&self.applied_edits_snapshot,
|
||||
&self.syntax_snapshot,
|
||||
None,
|
||||
&syntax_theme,
|
||||
syntax_theme,
|
||||
);
|
||||
|
||||
highlighted_text.build()
|
||||
|
|
|
@ -1830,7 +1830,7 @@ impl Language {
|
|||
|
||||
impl LanguageScope {
|
||||
pub fn path_suffixes(&self) -> &[String] {
|
||||
&self.language.path_suffixes()
|
||||
self.language.path_suffixes()
|
||||
}
|
||||
|
||||
pub fn language_name(&self) -> LanguageName {
|
||||
|
|
|
@ -1102,7 +1102,7 @@ impl LanguageRegistry {
|
|||
use gpui::AppContext as _;
|
||||
|
||||
let mut state = self.state.write();
|
||||
let fake_entry = state.fake_server_entries.get_mut(&name)?;
|
||||
let fake_entry = state.fake_server_entries.get_mut(name)?;
|
||||
let (server, mut fake_server) = lsp::FakeLanguageServer::new(
|
||||
server_id,
|
||||
binary,
|
||||
|
|
|
@ -187,8 +187,8 @@ impl LanguageSettings {
|
|||
let rest = available_language_servers
|
||||
.iter()
|
||||
.filter(|&available_language_server| {
|
||||
!disabled_language_servers.contains(&available_language_server)
|
||||
&& !enabled_language_servers.contains(&available_language_server)
|
||||
!disabled_language_servers.contains(available_language_server)
|
||||
&& !enabled_language_servers.contains(available_language_server)
|
||||
})
|
||||
.cloned()
|
||||
.collect::<Vec<_>>();
|
||||
|
|
|
@ -1297,7 +1297,7 @@ fn parse_text(
|
|||
) -> anyhow::Result<Tree> {
|
||||
with_parser(|parser| {
|
||||
let mut chunks = text.chunks_in_range(start_byte..text.len());
|
||||
parser.set_included_ranges(&ranges)?;
|
||||
parser.set_included_ranges(ranges)?;
|
||||
parser.set_language(&grammar.ts_language)?;
|
||||
parser
|
||||
.parse_with_options(
|
||||
|
|
|
@ -154,19 +154,19 @@ fn diff_internal(
|
|||
input,
|
||||
|old_tokens: Range<u32>, new_tokens: Range<u32>| {
|
||||
old_offset += token_len(
|
||||
&input,
|
||||
input,
|
||||
&input.before[old_token_ix as usize..old_tokens.start as usize],
|
||||
);
|
||||
new_offset += token_len(
|
||||
&input,
|
||||
input,
|
||||
&input.after[new_token_ix as usize..new_tokens.start as usize],
|
||||
);
|
||||
let old_len = token_len(
|
||||
&input,
|
||||
input,
|
||||
&input.before[old_tokens.start as usize..old_tokens.end as usize],
|
||||
);
|
||||
let new_len = token_len(
|
||||
&input,
|
||||
input,
|
||||
&input.after[new_tokens.start as usize..new_tokens.end as usize],
|
||||
);
|
||||
let old_byte_range = old_offset..old_offset + old_len;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue