From 6e2102a1e0c534d80730d72f4b0d7e8f94046875 Mon Sep 17 00:00:00 2001 From: JoshuaBatty Date: Tue, 30 Jul 2024 11:26:30 +1000 Subject: [PATCH] clippy --- sway-lsp/src/core/document.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sway-lsp/src/core/document.rs b/sway-lsp/src/core/document.rs index ad8a170c07b..c49f6750452 100644 --- a/sway-lsp/src/core/document.rs +++ b/sway-lsp/src/core/document.rs @@ -26,7 +26,7 @@ impl TextDocument { Self { version: 1, uri: path.into(), - content: content, + content, line_offsets, } }) @@ -77,7 +77,7 @@ impl TextDocument { self.content .replace_range(start_index..end_index, &change.text); } else { - self.content = change.text.clone(); + self.content.clone_from(&change.text); } self.line_offsets = Self::calculate_line_offsets(&self.content); self.version += 1;