Notable things I've had to fix due to 1.78:
- Better detection of unused items
- New clippy lint (`assigning_clones`) that points out places where assignment operations with clone rhs could be replaced with more performant `clone_into`
Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-05-05 15:02:50 +02:00 committed by GitHub
parent 9ec0927701
commit 1a9b0536a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 49 additions and 433 deletions

View file

@ -2072,7 +2072,7 @@ impl Buffer {
/// Override current completion triggers with the user-provided completion triggers.
pub fn set_completion_triggers(&mut self, triggers: Vec<String>, cx: &mut ModelContext<Self>) {
self.completion_triggers = triggers.clone();
self.completion_triggers.clone_from(&triggers);
self.completion_triggers_timestamp = self.text.lamport_clock.tick();
self.send_operation(
Operation::UpdateCompletionTriggers {

View file

@ -1126,7 +1126,7 @@ impl Language {
for setting in query.property_settings(ix) {
match setting.key.as_ref() {
"language" => {
config.language = setting.value.clone();
config.language.clone_from(&setting.value);
}
"combined" => {
config.combined = true;

View file

@ -82,7 +82,7 @@ impl<T> Outline<T> {
let mut prev_item_ix = 0;
for mut string_match in matches {
let outline_match = &self.items[string_match.candidate_id];
string_match.string = outline_match.text.clone();
string_match.string.clone_from(&outline_match.text);
if is_path_query {
let prefix_len = self.path_candidate_prefixes[string_match.candidate_id];